53 Threads found on edaboard.com: Bit Banging Code
that code does work.
If you post your code, and a block diagram or schematic or an explanation of your hardware setup someone here would be able to help you.
First, you should try communicating with the PC. Use a terminal program to verify that
everything is working.
For multi-processor communication you shouldn't use the (...)
Microcontrollers :: 14.02.2007 10:17 :: ctownsend :: Replies: 3 :: Views: 1714
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: 7789
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: 1338
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: 2038
need to use bit banging concept for software communication
Microcontrollers :: 25.05.2008 01:14 :: ckshivaram :: Replies: 3 :: Views: 1673
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: 765
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: 4474
my first post, im having issues with lcd on pic 18f1320, have ported the code from 16f84 sample and can place the cursor on the lcd with ease, but just cant get a character to appear.
my code is below, any help would be greatly appreciated
; lcd routine, testing delay routines for 5ms (4.1ms), 50ms (40ms), 150us (100us mini.)
Microcontrollers :: 15.06.2011 05:02 :: mgbglasgow :: Replies: 10 :: Views: 1098
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: 1321
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: 985
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: 807
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: 685
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: 208
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: 1286
Yes, but you have to resort to bit-banging.
Check here for code:
Microcontrollers :: 29.01.2005 16:58 :: XNOX_Rambo :: Replies: 2 :: Views: 842
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: 1311
Yes, I am using 4 wire without protocol (Serial Peripheral Interface) for my serial eeprom but I am not sure about reading process.
after transmitting the address bits, should I use the serial clock (off and on) in order to get 1 bit from the Data Out Pin?
can you please provide a sample code in C?
Microcontrollers :: 14.08.2005 07:39 :: Maverickmax :: Replies: 9 :: Views: 1808
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: 1363
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: 1850
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: 2264
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: 1410
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: 711
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: 6950
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: 4121
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: 2595
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: 1626
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: 1523
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: 806
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: 1097
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: 1834
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: 1576
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: 2728
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: 778
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: 2844
I'm doing a project named "Implementation of I2C Protocol"
I'm required to show the working of I2C protocol using a micro controller (say AT89s52) as a master and two slave-devices.
Slave Device #1: LCD
Slave Device #2: Not decided yet
I did some research on the internet and learned that 89s52 doesn't have hardware I2C interface. So eithe
Microcontrollers :: 12.03.2011 03:23 :: shreyas.p :: Replies: 2 :: Views: 1814
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: 972
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: 1614
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: 1395
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: 361
May i know what did u meant exactly "software based" and "Hardware based"?
"Hardware based" means protocol working with dedicated hardware like MCU registers, maybe interrupt driven etc. "Software based" is when you make the protocol by yourself, meaning toggling clock by software and driving bytes bit by bit to port
Microcontrollers :: 20.08.2011 07:06 :: alexxx :: Replies: 11 :: Views: 2178
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: 631
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
Microcontrollers :: 10.10.2011 16:52 :: wp100 :: Replies: 4 :: Views: 4626
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: 1210
Hello there I have almost completed coding interfacing with EEPROM - AT24C04 using I2C protocol,But using this I am able to perform a "READ" operation but not a WRITE.
I am using a similar kind of program( found on this forum ) for interfacing the EEPROM using I2C and this program works.
This program that I found can do both READ/WRITE....
Microcontrollers :: 28.11.2011 02:34 :: sayonee :: Replies: 8 :: Views: 896
it is a time ago when I read the datasheet of the vs1011, but it is a little bit like this:
the vs1011 has a buffer where you can send the file to it. the vs1011 gives a signal to the microcontroller if the buffer is full. In that case you need to stop the datastream. That is because the time to decode and playback is much slower than you can se
Microcontrollers :: 17.04.2012 07:07 :: weller :: Replies: 4 :: Views: 1062
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: 519
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:
My problem is i cant achieve (...)
Microcontrollers :: 16.07.2012 04:17 :: mrarslanahmed :: Replies: 2 :: Views: 405
Seems strange that a kit using the 877A which has plenty of 10 bit ADC ports has the mcp3202 connected to it but not on SPI ports - very unusual.
You can write your own serial comms code to communicate with the 3202 but a real pain !
If you must persue this line then try searching 'Software SPI' for some existing code that (...)
Microcontrollers :: 17.07.2012 04:50 :: wp100 :: Replies: 8 :: Views: 434
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: 731
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: 434