Search Engine

Bit Banging Code

Add Question

53 Threads found on 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 (...)
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.
Hi, 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. Thanks, newbie
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 (...)
need to use bit banging concept for software communication
bit time = 1/baudrate are you using interrupt for detecting the start bit? check this link hope it helps
Hi, 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? Thanks
hi all, 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.)
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
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, 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 (...)
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 (...)
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
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.
Yes, but you have to resort to bit-banging. Check here for code: /Rambo
Hardware: 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? Soft
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" best regards
Hai CCS is somewhat easy to start because of lots of built in functions and "configuration "settings. For example 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 (...)
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. Cheers Ravi
for AVR I2C: do you want code with internal I2C hardware or software (bit bang) I2C? If you need hardware check atmel website, they have application notes on AVR I2C,atmel use word "TWI Interface" instead of I2C.
Hi, 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 (...)
Hi 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 Bobi
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
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
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
yes, you can assign any pin as sda or scl and use software bit banging Regards Nandhu
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 void nokia_
Your DAC chip only has a SPI port to receive data on, so you must send the data in the SPI convention. Many smaller pic chips do not have a hardware SPI port, but they can still communicate with a SPI device by software control, commonly called ' bit banging '. A few searches of the forums should find you some code to work from that (...)
Hello, 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
HI 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 Bobi
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.
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 (...)
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 (...)
Hello! 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 (...)
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
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
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 (...)
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
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.
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
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. I
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
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.
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....
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
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.
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 (...)
Hi, 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 (...)
I would like to know which micro controller of 8051/8052 family which support ADE7763. I'm confused about ADE7763 having a 8bit or 16bit output. Thankx in advance
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.