53 Threads found on edaboard.com: Bit Banging Code
I tried modifying some bit banging code available(see ), but it didnt work. Can some one provide me with a valid and working bit banging code for the 8051?
Microcontrollers :: 09.02.2007 23:34 :: nerdspot :: Replies: 3 :: Views: 1552
Philips has an application note for bit-banged serial port.
May I suggest that it would be much more accurate if you do it in ASM. In C, it is difficult to predict the timing of your code.
Microcontrollers :: 28.08.2005 10:13 :: techie :: Replies: 10 :: Views: 7129
I am a newbie to Cypress PSoC syste. I was wondering if anybody can help me build a cheap programmer using parallel port and bit banging code. Any schematic &/or C code will be much appreciated.
Microcontrollers :: 24.02.2004 00:37 :: newbie2003 :: Replies: 2 :: Views: 1253
I woiuld imagine that the 8255 was made forthe 808X family of micros in which case a
port access statement would probably take care of all the proper pins going high and low with the proper timing. For other chips you would probably have to do bit banging.
This would definitley be the case for micros that do not have hardwre/opcodes for (...)
PC Programming and Interfacing :: 19.06.2007 13:04 :: jhbbunch :: Replies: 5 :: Views: 1948
need to use bit banging concept for software communication
Microcontrollers :: 25.05.2008 01:14 :: ckshivaram :: Replies: 3 :: Views: 1578
I am using P89C61X2 controller.
I want to connect one serial interfacing device to controller.
I am connecting it through bit banging.
I am not able to put time out, if the device not responds me.
Please help me out.
I am connecting device with 19200 bps,
I am confuse my used bit time is OK or not.
If my device is (...)
Microcontrollers :: 04.10.2008 07:58 :: suvarna_mtech :: Replies: 2 :: Views: 719
I am searching for an implementation for bit-bang I2C slave for PIC family, but all I found was few master implementations.
Any member came across such a code in C?
Microcontrollers :: 26.07.2009 08:16 :: metal :: Replies: 5 :: Views: 4202
Have used an assembler 18F 16x2 lcd routine for a long time - there are many slightly different ways doing the same thing.
If you can wait till tonight I can strip it out of my code and produce a complete, tested working program and send it over.
Are you wantng to use a 6 bit o 7 bit version ?
Microcontrollers :: 16.06.2011 04:39 :: wp100 :: Replies: 10 :: Views: 1019
I'm using 2 Atmega16 MCUs and i want to interface between them using I2C
and i know the pins configuration but i don't know the code which i should write
can any one help me??
Application notes from
Electronic Elementary Questions :: 05.12.2011 16:48 :: alexxx :: Replies: 2 :: Views: 1167
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
Microcontrollers :: 03.05.2012 08:39 :: Pheetuz :: Replies: 8 :: Views: 844
I have the attached source code, used to control a Nokia 3510i LCD, that has been working well with a PIC16F88 and PIC18F4550 for a long time. The code is using bit-banging to simulate SPI to interface with the LCD.
Now I am attempting to migrate it to a PIC24FJ64GA002, and strangely enough, it just doesn't work (...)
Microcontrollers :: 08.05.2012 11:00 :: mdanh2002 :: Replies: 3 :: Views: 639
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 (...)
Microcontrollers :: 28.08.2012 20:27 :: doraemon :: Replies: 8 :: Views: 568
i want to interface RF-ID module using any two pins of 8051...
i have written following code...
#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
Microcontrollers :: 15.07.2013 07:02 :: sanket.joshi :: Replies: 0 :: Views: 159
I'm doing a project with PIC 16F628, and it has only one serial port. However I need two serial ports, therefore I have to convert one Parallel port into a Serial port in order to make the PIC communicate with a PC. But I have to do this by software, and I haven't found a site that explains how to do this or that has the source code.
Microcontrollers :: 11.11.2004 03:07 :: C-Man :: Replies: 6 :: Views: 1210
Yes, but you have to resort to bit-banging.
Check here for code:
Microcontrollers :: 29.01.2005 16:58 :: XNOX_Rambo :: Replies: 2 :: Views: 792
Well, you'll be needing to convert the TTL output of the AVR to RS232 transmission line voltages to be sent along the serial cable, these range from -25v to +25v. You can use the MAX232 for this.
Another thing is, will you be using all the pins of the serial port (such as the CTS or RTS etc) or just the Tx/Rx and Ground lines?
Microcontrollers :: 02.06.2005 16:41 :: Sputnik :: Replies: 1 :: Views: 1221
Look for example here for a small explanation of the SPI bus:
You have two options:
1) if your micro has spi hardware built in I would use this
2) you can create SPI via "bit banging"
Microcontrollers :: 14.08.2005 12:15 :: C-Man :: Replies: 9 :: Views: 1724
CCS is somewhat easy to start because of lots of built in functions and "configuration "settings.
you can create a bit banging serial port or IIC by simply calling a function of CCS compiler with the required pins specified
but the code will not be portable to another chip because you will be heavily (...)
Microcontrollers :: 28.02.2006 22:31 :: UroBoros :: Replies: 17 :: Views: 1316
i am using only one slave. so do i need to connect the SS pin?
i am not able to transmit any data...
can u give an example code?
IMHO, the SS need to be connected too. I use bit banging technique rather than the SPI engine. The code can be ported to any uC that do not have SPI engine.
Microcontrollers :: 04.05.2006 08:44 :: ravimarcus :: Replies: 5 :: Views: 1716
Actually the examples implement Hardware I2C , i want to use Software I2C for PIC16F84A.
Google for 'I2C bit-banging'. I have found one or two examples, but they are all gone because of a hard drive crash. Good luck!
BTW, be more specific next time (say exactly what you want).
Microcontrollers :: 08.01.2007 12:46 :: namqn :: Replies: 16 :: Views: 2123
Im looking for some specifications and/or source code which shows how to program an external flash on an ARM7 core through JTAG.
It seems there are two possible ways of doing this.
1. bit banging the boundary scan register of the ARM7 core
2. Running the ARM7 core in debug mode and injecting flash programming instructions (...)
Microcontrollers :: 18.06.2007 03:36 :: mavo :: Replies: 2 :: Views: 1266
Yes it is , you will need to do bit banging on the I/O poert simulating I2C bus in master mode
Do not try to do I2C bus in slave mode using I/O very hard to impliment
I belive you can find code for I2C master mode in TI site
All the best
Microcontrollers :: 07.07.2007 06:44 :: bobcat1 :: Replies: 1 :: Views: 597
ya its possible to connect both to 8051, I suppose you will just be receiving data frm the GPS module and not sending anything to it
and as for GSM module you will be sending as well as receiving data
so connect the GSM module to the 8051's com port and use basic serial program for it as for the GPS module connect it to P3.2 and use sofware bas
Microcontrollers :: 13.09.2008 13:18 :: amol_shah :: Replies: 23 :: Views: 6762
I va tried bitbang procedure given in samples of PICC on PIC16F877A , when i tried to utilized it for PIC18F452 it does not work
Compiler Used :
Hi-Tech PICC for 16F877A
Hi-Tech PICC-18 for 18F452
please help ..
* Serial port driver (uses bit-banging)
* for 16Cxx series parts.
* IMPORTANT: Compile this file with F
Microcontrollers :: 24.09.2008 03:57 :: saeed_pk :: Replies: 1 :: Views: 4018
Couple of things to consider. First, the DS1307 is I2C, so you must be satisfied that your protocol is compliant. Are you bit banging or using a dedicated function. Secondly, your device has particular needs when using the battery backup terminal. Read the documentation carefully as to how the device write protects itself, and how to exit that cond
Embedded Systems and Real-Time OS :: 30.03.2009 14:57 :: GetDeviceInfo :: Replies: 3 :: Views: 2512
yes, you can assign any pin as sda or scl and use software bit banging
Microcontrollers :: 17.04.2009 07:53 :: nandhu015 :: Replies: 5 :: Views: 1516
I am trying to interface the Nokia 6610 color LCD with a pic18F4550. I am using CCS PICC compiler for the programming of the microcontroller. I can do everything with the LCD by using software spi i.e. bit banging but when I try to do the same using hardware SPI nothing happens at all. Here is the code that i am talking about
Microcontrollers :: 27.05.2009 15:05 :: jitun :: Replies: 0 :: Views: 1409
I have 16 bit data after ADC processing and i want to transfer it to DAC 8581 without using SPI of dspic. can you please support code for me to do it? Thanks you much!
Microcontrollers :: 01.06.2009 14:44 :: zidean007 :: Replies: 1 :: Views: 772
I'm quite new in programming microcontrollers.
I was wondering, if I want to make a 'clock' on a GPIO, what would be it's maximum rate? I suppose - if I put, for example: RB1=1, then RB1=0 in a loop, the clock rate will be twice the time of the execution time of the used instruction. Am I right?
The thing I would like to do is to acc
Microcontrollers :: 28.06.2009 04:56 :: vjcro :: Replies: 1 :: Views: 1020
Did you add pull up resistor on the I2C bus between the TC65 and your controller?
Dose your controller support hardware I2C or do you use Software (bit banging) I2C?
All the best
Microcontrollers :: 27.09.2009 03:25 :: bobcat1 :: Replies: 6 :: Views: 1768
Can you clarify, which CAN software interface implementation you're referring to? I expect, that an attempt to implement
a software (bit-banging) CAN interface at usual bit rates (e.g. 500k) would almost prevent regular operation of an uC.
Microcontrollers :: 05.12.2009 08:22 :: FvM :: Replies: 4 :: Views: 1486
If you are going to post long sections of code, please use the 'code' tag before and after it to preserve formatting. It would also help if you told us what the code is supposed to do and put far more comments in it.
However, without going into too much detail, it looks like you are trying to send something serially by (...)
Microcontrollers :: 28.02.2010 04:39 :: betwixt :: Replies: 5 :: Views: 2562
Not really a new topic, but here goes...
I am a beginner tasked with making a master PIC communicate with up to 3 slave PICs over a single wire using MPLAB assembly. USART/RS232 is ok, but am also open to bit-banging methods. Any pointers on where to begin, including websites with code samples and textbook listings, will be greatly (...)
Microcontrollers :: 21.07.2010 14:55 :: nina_s :: Replies: 3 :: Views: 721
The circuit is quite easy. See attachment.
So you need 4 wires, 3 for the SPI bus and one for chip select (use a general purpose IO port).
The drawing was for MSP430, but any processor would do it. And if you don't have a SPI port,
you can make one by bit banging.
What kind of source code do you want? I think you can find everything (...)
Microcontrollers :: 21.10.2010 22:53 :: doraemon :: Replies: 12 :: Views: 2617
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
Microcontrollers :: 12.03.2011 03:52 :: Love_Electronics :: Replies: 2 :: Views: 1626
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.
RF, Microwave, Antennas and Optics :: 12.03.2011 08:04 :: grabbo :: Replies: 3 :: Views: 862
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 (...)
Software Problems, Hints and Reviews :: 23.03.2011 01:01 :: geobabu :: Replies: 4 :: Views: 1477
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
Microcontrollers :: 09.05.2011 14:54 :: horace1 :: Replies: 2 :: Views: 1248
FTDI site has all the appnotes and sample code, including C++ for bit-banging, you'll need.
Look in the appropriate appnote, for your device model, links to code examples can be found within.
Microcontrollers :: 21.07.2011 00:59 :: bigdogguru :: Replies: 1 :: Views: 289
Ya i can understand bit banging. But this is what Mr.John meant is my question? we can see his code or the CRO pulses to figure out the problem.
Thanks for your reply
Yes it is. I am bit banging my SPI and I2C :)
Microcontrollers :: 20.08.2011 07:31 :: john blue :: Replies: 11 :: Views: 2019
I see no problem you have to face in your setup. The PC SW will know nothing about nature of RS232 port it will use. It can be a real RS232 or Virtual one via USB adapter unless you are using real time bit banging with pins of RS232 port. If you are just sending data bytes there should be no difference between UART based or Virtual COM port.
Software Problems, Hints and Reviews :: 28.09.2011 05:11 :: flamefur :: Replies: 2 :: Views: 560
so thank for explain about that. i use program call Mikro C Pro. if possible can you explain me about software usart and bit banging ? and can we use PIC link to PIC by using eusart? becuase i have seen some book about usart but of that say just only using usart with host pc.
thank you for your kindness
Ofcoure PIC can
Microcontrollers :: 11.10.2011 21:57 :: engshahrul :: Replies: 4 :: Views: 3648
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.
Microcontrollers :: 23.11.2011 04:22 :: wp100 :: Replies: 3 :: Views: 1025
Man, why are you bit-banging I2C? Most MCUs have hardware module which can handle about 80% of the code you have posted in hardware...
What MCU are you using?
Microcontrollers :: 28.11.2011 03:00 :: poorchava :: Replies: 8 :: Views: 780
I used VLSI 1011 chips before, they are a bit hard to get starting, but once you got it it's pretty straight forward.
Are you developing board or using proven design board and developing codes?
There is no major INT command, you read the MP3 hex and shift it to VLSI, it can take only 32-byte, then it will give High on one pin, then you stop
Microcontrollers :: 18.04.2012 11:52 :: mpathma :: Replies: 4 :: Views: 888
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.
Microcontrollers :: 21.06.2012 03:50 :: FvM :: Replies: 2 :: Views: 436
I assume you are bit-banging a software UART. Is it possible to use the built in hardware UART?
You don't tell us which PIC and at what clock speed you are using but most PICs can generate both those rates at 4MHz and at 20MHz with less than 0.5% speed error. If your PIC has a 16-bit baud rate generator it will be even more accurate.
Microcontrollers :: 16.07.2012 04:29 :: betwixt :: Replies: 2 :: Views: 339
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.
Microcontrollers :: 18.07.2012 06:25 :: wp100 :: Replies: 8 :: Views: 384
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
Professional Hardware and Electronics Design :: 28.07.2012 08:14 :: FvM :: Replies: 5 :: Views: 634
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.
PLD, SPLD, GAL, CPLD, FPGA Design :: 14.08.2012 09:31 :: yourcheers :: Replies: 6 :: Views: 382