Search Engine

Bit Banging

Add Question

87 Threads found on Bit Banging
No difference. SPI_Write used twise will shift out 16 bit to MOSI pin anyway.
Hi, Is it possible (easily) to implement SPI programmatically? ya, it is possible to implement the protocol programmatically with GPIO pins, concept to implement a protocol with GPIO's is called bit banging. Check bit banging concept on wiki, then you come know about it.. Data rate is irrelevant, a few kbps will do[/QUOTE
Ok. Here you go. I am attaching the mikroC PRO PIC project I made. You can't reduce the delays more. You are using bit-banging SPI instead of the PIC hardware SPI. It's hardly possible to achieve a similar speed this way. I don't see how the designs in post #16 and #17 can be helpful.
Looks like you have copied 8051 I2C routines without understanding their operation or considering the hardware differences between 8051 and PIC GPIO. I2C pins (at least SDA) have to be driven in an open drain manner, doing this with a PIC involves writing to the TRIS register. It's surely possible to implement bit-banging I2C routines, but it wo
How about using a SPI UART like the MAX3107? You have a SPI controller available on the chip. A soft uart of higher speed will use a lot of the available capacity of your micro. Using an interrupt driven soft uart may cause glitches in both the data stream of both the UARTs. A bit banging solution with delays is worse, since you need to turn off
I don't understand the code. Why are you calling the initialization repeatedly? Generally it's hard to understand what you are trying to achieve. AD80066 is designed to work with MHz clocks, I'm not sure if it gives meaningful output with slow bit-banging clocks. Even if it would, what is it good for?
Hi, what is the bit banging?? what is the concept of it? How it is effected on SPI and I2C protocols?? can any one explain about it? Thanks & Regards, Chandu.Kurapati.
Hi All, I am working with Ubicom IP3023 and have a work with SPI interface. The SDK has IpSPI which seem to have SPI driver which works using bit banging. While this works its usually very slow. I prefer the SPI uses peripheral hardware for SPI instead of bit banging. From my SDK I noticed that IP2K series used peripheral (...)
Hello Friends, I am trying SPI bit banging approach to interface ADC 0832 with AT89C51RD2. I have written following code for same purpose; however I am not able to develop logic for receiving a serial data from ADC 0832 and convert it into readable/usable byte to transmit received byte to PORT 2. Please find the attached code and my hardware sim
Although the protocol is not excatly SPI, the device can be well driven by a SPI master controller if you fill up the frame to 16 bit. Of course you don't need a dedicated SPI interface and can perform port bit-banging instead, but the same is true for standard SPI peripherals.
Hi Friends, I am trying to interface CC1125 with PIC24F32KA302 i am new to SPI. I am looking for the SPI code for this . Can any one help me how to write code for it in XC 16 compiler using bit banging ports.
You should use CCP registers to generate PWM signals, bit banging isn't the greatest. The code you are showing appears to be setting the ports correctly for I/O. What is your delay structure or what compiler is this? What is the code outputting? How are you measuring it? How is the hardware setup?
There's already on-chip UART in 89s52. You can use it for simplicity. Is there any specific reason for choosing I2C??? The best common technique for implementing SPI or I2C on 8051's is bit banging by using "RLC" in assembly. Refer to this:
I have issues in spi communication in bit banging technique.. As of now am able to send/write data to the peripheral... it works fine as expected.. But when i try to read data from the same peripheral but the recieved data is not as expected.. Am using a standard library code for bit banging...and i ve just added my (...)
Hello I am interfacing Freescale Accelerometer MMA8653 with STM32F100 using I2C bit banging it working using interrupts , and the interfacing of the Accelerometer are configured as high to low and controller port configured as input pull up and on the falling edge I have a specific code to perform like reading the new Accelerometer val
Can someone give me exactly the code of bit banding using LPC4357 set pin 9_5 GPIO5 high ?
hi you can connect GSM with PIC's hardware UART(serial port) and you can use software UART(using bit banging technique) for GPS as you need to only receive data from GPS so it should be simple
Explain how to access the bit-banging in the serial SPI ADC
If you want another Timer other than the hardware one, that usually comes built-in in microcontrollers then you can use software timers- a technique also called bit-banging. In this technique you can just shift your data( stored in any variable) left or right so that it can be escaped out from a desired pin-out of the microcontroller in LSB first o
i want to interface RF-ID module using any two pins of 8051... i have written following code... include #include #define _XTAL_FREQ 11059200 #define Baudrate 9600 #define OnebitDelay (100000000/Baudrate) #define port P0 #define lcdport P1 //14,13,12,11 pins of lcd and 1.7,1.6,1.5,1.4 o
Using own bit-banging SW Usart routine it's possible and not so difficult when you know the format of the incoming bit-stream.
hitech c software uart example code /* * Serial port driver (uses bit-banging) * for 16Cxx series parts. * * IMPORTANT: Compile this file with FULL optimization * * Copyright (C)1996 HI-TECH Software. * Freely distributable. */ #include /* * Tunable parameters */ /* Xtal frequency */ #define XTAL 4000000 /* Baud rate
I have not worked with PIC, but hardware modules for both UART and SPI should be available inside the MCU. You could make it by software (so called "bit banging"), but it would be better to stick to the hardware implementation, by setting proper registers and read - write serial data via hardware buffers. As for interrupts, if you have big packets
Pins are SCK, SDO(MOSI), SDI(MISO) and chip select (SS). All signals are generated by software (so called bit-banging). There are plenty of examples on the internet.
Hello! We connected SD with SPI interface, modified the code for this purpose. The problem may be here: what did you change and why? By the way, looking at your second code, are you bit-banging SPI? Or is it a test program? Using the definitions you have in your second piece of code, try to write a small program like this: CS_H
You can use PowerPC, by using bit-banging( ) approach you can perform the same. But I recommend you to do in hardware, as the PowerPC process is very complicated.
Hi, What you are suggesting, manually sending out a series of pulses is called bit banging, basically software based serial communication. Much simpler and safer if you use the chips inbuilt EUSART serial hardware, then you just tell it to output a whole byte at a time and the two chips will properly syncronize themselves Do not connect the
All ADI energy meter chips have to be connected through SPI. Because a basic 8051 doesn't expose a hardware SPI interface, you need to implement it in software using bit banging. 8051 example code can be found on the internet, I guess. P.S.: microc for 8051 has e.g. built-in software SPI functions
Hi, Hmmm... hope they are going to pay you extra for all your hard work !! Should try searching the web a lot more than I did for some ready made code examples, try ' Software SPI' or 'bit banging SPI'. Also look at 'PicList', they seem to have lots of code references.
Need help regarding PIC code, I am working to generate 5150 and 16600 Baud rate, using 8 bit asycrhounous UART .. Please give me some design recommendation. I am just delaying for approximatly 20Useconds for 5150 baud rate. delay code is: delay_200us() { for(j=0;j<60;j++) asm nop; } My problem is i cant achieve precis
hi ashkar, i understand u r trying to do spi bit banging. i suggest u to read SPI protocol first. and please recheck the Din which u have used is for data receive or transmit. usually it will be used to receive data. pls post ur circuit diagram for better clarity.. finally when u do bit banging, u have to transmit (...)
Is it possible to implement JTAG with SPI? Yes. The TMS related part of the protocol needs still to be implemented through bit-banging. You need to switch the JTAG interface pins between GPIO and dedicated SPI mode. I guess, it's possible with your processor.
Was there a question in there somewhere? Sounds like a fun project, you'll need to set up a timer to interrupt at a specific frequency, ideally 16x that of what you want to send data at, this clock can then be used to determine your timing parameters, generate a start bit, look for this start bit at the other end by sampling your incoming signal at
Hi, There is no problem in connecting two pic together like that - you are creating a simpler version of whats known as a software usart or "bit banging" thats often used when a chip does not have a hardware usart or it is already doing something else. When linking the ports between the pics insert a 1k resistor in series to help prevent any
Dear mahesh, Are u using bit banging method? Because i didn't find hardware support of the SDA and SCL on the specified controller MSP430G2x31.. I refered the following tables in the data sheet. "Table 18. Port P1 (P1.0 to P1.2) Pin Functions ? MSP430G2x31" "Table 19. Port P1 (P1.3) Pin Functions ? MSP430G2x31" "Table 20. Port P1 (P1.
Hi, You have the Pics Hardware Usart on RC6 and RC7. If you want to use any other i/o Ports you can, but you must write your own Serial code, known as a Software Usart or bit banging There a some ready made examples on the web, though you do not say what language you are using.
In bit-banging I2C operation, you'll usually drive the pins by the direction register, leaving the output latch in low state. This way, the output changes betweeen output low and tristate. According to I2C standard, both SDA and SCL are operated this way. If none of the involved I2C slaves is performing clock stretching, SCL can be operated push-pu
Hi, The E stands for Enhanced Usart, its basically the same but with some extra features like Sleep/ Wake up on receive. You do not need a Usart module to send out serial data, you can simply use your program to send out the data, known as a software usart or bit banging. With Hardware Usart the incoming or outgoing byte of data is passed
Your basic requirements are the generation of Pulse Width Modulation (PWM), of which the defacto square wave is PWM with a 50% duty cycle, half the period of the waveform ON and the other half OFF. There are primarily two ways of generating PWM, through software/bit-banging or using a hardware PWM module on the MCU. What MCU are you using in your
FTDI site has all the appnotes and sample code, including C++ for bit-banging, you'll need. Application Notes Look in the appropriate appnote, for your device model, links to code examples can be found within.
Gokul, If you are talking about GPS reception and message send through GSM, you can surely do that with single UART. If its receiving and sending messages with GSM and receiving signals via GPS. you can still do that with minor modifications in your hardware, considering the fact that you can either read GSM or GPS and any given point of time not
Hi, The previous replies refer to chips with inbuilt Usart hardware and this is the more normal approach, however it is not essential for serial communication. You can use or write you own Software Usart and send / receive data that way through any standard i/o port - its also known a 'bit banging' You can have more than one software usart
Hi, I have seen that people on this board have used the FT2232H before. This IC has two separate ports which you can bit bang or use a USB to serial converter. I'm wondering if it's possible to use the bit bang interface on one channel and the serial interface on the other at the same time? The spec sheet doesn't seem to say anything about it th
here is an example of controlling SPI using bit banging over a GPIO port Serial Peripheral Interface Bus - Wikipedia, the free encyclopedia
I assume you don't wish to use the built in SPI interface of the PIC? To use GPIO pins there is some example C code for bit banging SPI see Serial Peripheral Interface Bus - Wikipedia, the free encyclopedia
if you following the bit banging method,( hope its bit transfer and recieve fuctions are written properly. along with CLK in the SCL line) the following method will give you an idea. If you are storing an int data, jus change char to int and split the data into upper & lowerbytes and store into memory. While reading you should read the bytes (...)
Im working with RFM12B and MSP430. SPI - bit banging and module as transmitter. All i want to manage is to get nIRQ high after i read status command (0x0000) and as response 0x4000 -> Spi is workinG. When i send the status command (0x0000) , the response is 0xA100 always and IRQ is low. rf12_port_init(); rf12_wrt_cmd(0x0000); rf12
Hi, 1. The document you shared contains code for PIC microcontroller as (TRISB TRISA all happens in PIC). 2. bit banging is easy, follow rickeys world website on 8051 , so many examples for the same, use keil uvision or RIDE to compile interface LCD over I2C you either need a another MCU as I2C slave or I2C IO expander, another MCU wo
It would seem that there’s no Atmel uC matching your criteria (PDIP and 3 UARTs). As an alternative to bit banging (SW emulated UART) and to using 2 uCs, I would suggest you select your favorite uC (preferable one with plenty of memory for beginners) and add an external UART controller (such as EXAR’s dual channel UART, XR88C681 or XR68
I'm currently enrolled in a microprocessors course in my electronic engineering program. I'm having some issues getting started since my knowledge with c is only a couple of weeks in now. I realize that there are other topics on here relating to bit-banging already but I'm having trouble understanding the process required just to begin shifting out