151 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 16:17 :: ctownsend :: Replies: 3 :: Views: 1227
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 16:13 :: techie :: Replies: 9 :: Views: 5642
Maverickmax,
Its becoming a habit :)
When I wanted to test out my MIDI controller (basically a UART) I used 'hyperterimal'
once set to the correct baud, its doesn't show you the wave form, but it does display what the packet is in ASCII. After all, it was designed for text. There are some progs on the net (free ones) that are similar but
Microcontrollers :: 28.08.2005 23:17 :: Buriedcode :: Replies: 5 :: Views: 786
Your code :
;Rx at another AT89C51
SEND EQU P1.0 ;Transmit on this pin
RECV EQU P1.1 ;Receive on this pin
; The serial baud rate is determined by the processor crystal, and
; this constant which is calculated as: (((crystal/baud)/12) - 5) / 2
bitTIM EQU 494 ;(((3579545/300)/12) - 5) / 2
;
getc:
loop:
JB RECV,loop ; Wait fo
Microcontrollers :: 03.02.2007 18:06 :: budhy :: Replies: 10 :: Views: 1375
Configuring one channel for bit bang using ftd2xx driver and the other as virual com port is supported for FT2232 (I guess, it's the same for FTx232H). It has to be setup in the configuration EEPROM.
Achievable throughput in bit bang depends on how you manage to send off a number of actions as a block. If you're required to poll a device status,
Microcontrollers :: 07.07.2011 09:22 :: FvM :: Replies: 6 :: Views: 1067
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
Microcontrollers :: 24.02.2004 06:37 :: newbie2003 :: Replies: 2 :: Views: 1168
Hi,
bitbanged receiving is almost always a problem ...
In case of your GPS you could try to switch the GPS to a lower baudrate (1200 baud for example) bitbanging might be easier then because the timing is less critical.
What is the clock frequency of your pic and which code do you use for bitbanged (...)
Microcontrollers :: 27.11.2004 18:04 :: C-Man :: Replies: 20 :: Views: 7932
'bit banging' if your using normal microcontroller otherwise use serial (NOT UART - That is Asynchronous data) synchronous controllers like the Z85C30 from Zilog. No gaps or what ever !!. You can use this chip also in plain mode, that is "shift register" mode with only CRC calculation and sync function !!. I also used it as a nice shift register b
Digital communication :: 24.06.2006 18:21 :: PaulHolland :: Replies: 6 :: Views: 1036
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 19:04 :: jhbbunch :: Replies: 5 :: Views: 1703
I've never had a PIC that would work as both master and slave on 2 different I2C buses. Even if CCS compiler can't handle multiple #use i2c(...) directives, you can write your own bit-banged software I2C code for the bus, where PIC is a master, and use only one #use i2c(..., slave) for the bus, where the PIC is a slave.
I would recommend the s
Microcontrollers :: 04.04.2007 04:41 :: kender :: Replies: 9 :: Views: 6573
need to use bit banging concept for software communication
Microcontrollers :: 25.05.2008 07:14 :: ckshivaram :: Replies: 3 :: Views: 1328
bit time = 1/baudrate
are you using interrupt for detecting the start bit?
check this link hope it helps
Microcontrollers :: 04.10.2008 19:03 :: amol_shah :: Replies: 2 :: Views: 626
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
Microcontrollers :: 26.07.2009 14:16 :: metal :: Replies: 5 :: Views: 3644
Hi Hobby_85.
Your system is very similar to one of mine. I have one master control unit indoors and 5 slaves controlled from it. The master has the radio link, a link to a PC, and LCD display, keypad and a few warning lights/buzzers. The slaves do various things from monitoring RFID tags to controlling pumping equipment.
Firstly, the master/
Microcontrollers :: 22.08.2009 18:09 :: betwixt :: Replies: 19 :: Views: 1867
LIST P=PIC16F84, R=DEC
#INCLUDE "p16f84.inc"
;------------------------------------------------------------------------------
; ASSEMBLE With MPASM. available for free from Microchip Technology Inc. is a Leading Provider of Microcontroller and Analog Semiconductors, providing low-risk product development, lower
Microcontrollers :: 22.01.2011 14:10 :: ckshivaram :: Replies: 4 :: Views: 2362
Hi,
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 10:39 :: wp100 :: Replies: 10 :: Views: 811
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 22:48 :: alexxx :: Replies: 2 :: Views: 865
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 14:39 :: Pheetuz :: Replies: 8 :: Views: 568
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 (...)
Microcontrollers :: 08.05.2012 17:00 :: mdanh2002 :: Replies: 3 :: Views: 445
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 (...)
Microcontrollers :: 29.08.2012 02:27 :: doraemon :: Replies: 8 :: Views: 335
A Baud rate of 9600 can be a challenge for a bitbanged UART.
I would suggest attempting either 2400 or 4800 Baud before troubleshooting the 9600 Baud rate.
Also attempt to establish communications using a standard serial cable before utilizing any RF or Bluetooth modules.
BigDog
Microcontrollers :: 03.09.2012 18:39 :: bigdogguru :: Replies: 3 :: Views: 883
About the only choice you have is to "bit Bang" the data. There are plenty of examples on the web of how to do that.
Microcontrollers :: 11.11.2012 12:31 :: GSM Man :: Replies: 9 :: Views: 472
On NoIce site you could read :
# Enough EPROM to hold the monitor (about 1024 bytes; smaller than most stand-alone monitors).
# Enough RAM to hold the monitor's data (32 to 256 bytes, depending on the number of processor registers and the desired communications buffer size)
# A UART to communicate with the PC host (or an input bit, an output b
PC Programming and Interfacing :: 19.12.2002 13:37 :: sc/mp :: Replies: 16 :: Views: 4396
2pins - 1 for data, 1 for clock
and then bit banging on the receiver
you can also use a additionally pin for interrupt generation ...
... or ...
you connect clock signal to a port pin with int. capability ...
... or ... or ... or ...
This is not so hard, isn't it? :wink:
PC Programming and Interfacing :: 09.10.2003 11:08 :: Mr_Programmer :: Replies: 10 :: Views: 2747
No..the question hasn't been answered!!!!
The question was also what command are accepted by PS2 gamepad...
Normally they just power-on as normal on/off joystick type and you can either switch to analog manually or via serial interface...and tehr are for sure more supported commands here
Yes, you are right this haven'
Microcontrollers :: 28.09.2004 16:53 :: ME :: Replies: 24 :: Views: 6719
The PIC you are using has a hardware USART. A hardware USART makes things easier as all you have to do is to initialise it and pump your data to/from a particular register. A software USART is a USART implemented in software, by a process called bit-banging, where you push/read bits out of a GPIO pin according to the serial RS232 protocol. (...)
Microcontrollers :: 28.06.2004 17:20 :: checkmate :: Replies: 17 :: Views: 2445
Yes, you can do this. The technique you are looking for is called "bit-banging" since the 16F84 does not have a UART. Take a look here for some good stuff:
Also, see here - scroll down to the software-only serial links:
h
Hobby Circuits and Small Projects Problems :: 13.07.2004 23:22 :: FoxyRick :: Replies: 20 :: Views: 3610
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 09:07 :: C-Man :: Replies: 6 :: Views: 1044
Yes, but you have to resort to bit-banging.
Check here for code:
/Rambo
Microcontrollers :: 29.01.2005 22:58 :: XNOX_Rambo :: Replies: 2 :: Views: 709
Hi maverick,
AT89C51 and AT89C52 has no hardware support (special registers) by default for I2C bus.
If you want to use these microcontroller for I2C implementation you have to do a what is called "bit bang" procedure.
For learning about I2C you can look here:
Microcontrollers :: 13.03.2005 21:10 :: silvio :: Replies: 7 :: Views: 1268
Hi Munib,
I've got the best results with the following procedure:
1. send out a preamble (1-3 Bytes this depends on your receiver), take 0xAA or 0x55
2. use a start sign, as example 0x33
3. detect the start sign via bit banging the port pin
4. after you have your start sign switch on the uart
5. if your message is short, use bit (...)
Microcontrollers :: 03.04.2005 16:22 :: Mr_Programmer :: Replies: 8 :: Views: 2297
After disasm usb blaster driver - file jtag_hw_usb-blaster.dll some infos are found:
ftdi direct driver ftd2xx.dll called.
Possible device ID's :
VID_09FB&PID_6001
VID_09FB&PID_6002
VID_09FB&PID_6003
Ftdi serial EEPROM (after config info) contain blaster revision number.
Driver checked this number when staring.
Only thys function
PLD, SPLD, GAL, CPLD, FPGA Design :: 10.04.2005 20:22 :: khach :: Replies: 108 :: Views: 85745
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
Microcontrollers :: 02.06.2005 22:41 :: Sputnik :: Replies: 1 :: Views: 1025
I am a beginner in PIC and several weeks ago, I found the MikroBasic compiler. The IDE is good and I was able to make my first simple program, like running light.
Unfortunately, it seems that the Mikrobasic compiler lacked the necessary documentations which a beginner like me needs, like simultaneously setting the bits , bit-banging (...)
Microcontrollers :: 28.08.2006 05:56 :: guillar :: Replies: 10 :: Views: 25791
This is the code I want to convert,
; Generated by WinDis84, (c) Nigel Goodwin 1998.
LIST P=16F84, F=INHX8M
include "P16FXX.inc"
ORG 0x0000
MOVLW 0x00
MOVWF PCLATH
GOTO Label_0001
NOP
Label_0016 MOVLW 0x21
MOVWF
Microcontrollers :: 09.08.2005 21:12 :: glenjoy :: Replies: 11 :: Views: 6063
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
Microcontrollers :: 14.08.2005 18:15 :: C-Man :: Replies: 9 :: Views: 1465
Hi
The SPI shift register is size limit e.g. 8 bit or 16 bit in some micro there for you have to reload the register from packet to packet
All the best
Bobi
Microcontrollers :: 19.08.2005 16:54 :: bobcat1 :: Replies: 4 :: Views: 627
Hi,
As far as I know, most RF systems can only transmit a 'DC- balanced' signal, with no DC component. You are transmitting standard serial (start, byte, stop) which has a DC bias, when its idle the line is high.
However, because the TX/RX can't convey the 'DC component' of the signal, at your Rx, the idle signal will just drop to zero, fool
Microcontrollers :: 22.08.2005 00:02 :: Buriedcode :: Replies: 15 :: Views: 4220
The SPI interface can easily be implmented in software by bit-bashing. If the 8051 is going to be the master, then you do not need to use the interrupt. Simply start shifting data in/ out as you wish. The timing is not critical, as long as you do not exceed the maximum speed of any of the slaves (I find it hard to believe you could).
If the 8
Microcontrollers :: 23.08.2005 06:41 :: VVV :: Replies: 6 :: Views: 1065
Hi Vinash,
I've notice you struggle to get some ADC with AT89C4051.
First with default comparator and RC external.
Then you tried with MCP3208 suitable for 4051 due to few connecting lines using SPI bit bang since 4051 has no default SPI interface.
Now y
Microcontrollers :: 13.12.2005 20:07 :: silvio :: Replies: 11 :: Views: 3466
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 (...)
Microcontrollers :: 01.03.2006 04:31 :: UroBoros :: Replies: 17 :: Views: 1217
The easiest way of learnig is to work with examples ..
Here you will find detailed description, including 8050-code, on how to interface 24CXX memory with 8051-derivative:
This article covers the specific hardware description and software routines required to interface the MAX7651 and MAX7
Microcontrollers :: 23.04.2006 06:34 :: IanP :: Replies: 14 :: Views: 1252
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
Microcontrollers :: 04.05.2006 14:44 :: ravimarcus :: Replies: 5 :: Views: 1453
Is it possible to use USART engine for transfering data from one PIC to another (Programming 16FXX from 16F87XA)
or I have to use bit banging?
Why not ! In the PICmicro that do not have UART engine, bit banging technique is used. As long as RS232 communication occurs using BB or UART, communication can and will occur
Microcontrollers :: 04.05.2006 06:31 :: ravimarcus :: Replies: 21 :: Views: 5029
The '508 part doesn't have a hw serial port, but TX is easy to do by bit banging. You could just have the PIC output the data constantly.
Regards,
Microcontrollers :: 13.06.2006 01:51 :: BeeBop :: Replies: 9 :: Views: 921
everything anybody mentioned here is true but still
i did several pic adc with common ground, no lpf, only bypass c and never had problem with such high noise. breadboard with bypass c only gives me abt 1-2 bit noise maximum. so probably there is other problem
regards
cancel
Microcontrollers :: 20.06.2006 09:34 :: cancel :: Replies: 12 :: Views: 5336
Hi Elnegm
USART is hardware - Universal Synchronous Asynchronous Receive & Transmit Engine.
No fixed protocol (7,8 or 9 bit with or without Receiver Addressing) but is normally capable of protocols that incorporate:
Asynchronous - usually RS232, RS422 & RS485 - two wires TX & RX with pre-defined data rate and receiving synchron
Embedded Systems and Real-Time OS :: 16.07.2006 03:06 :: polymath :: Replies: 6 :: Views: 25920
Hello friends,
Can anyone please explain what a uart is?And is it necessary that Uart must be of 8bits.And how many registers are used in that?And is there by any chance the output from Uart parallel?
I know that Uart is designed for serial data output,but can data be absorbed from any registers from where it is parallel?
waiting for reply
Che
Electronic Elementary Questions :: 06.08.2006 18:09 :: Tan :: Replies: 2 :: Views: 1636
Hi
I am currently stuggeling to get my SD Card to interface with my PIC18F4550. I keep on getting a ERROR in Hyperterminal:
Test MMC driver
mmc init fault
Start...
I am using CCS compiler and interface the SD Card and MMC card via SPI. I just want to write data to the card and read
Microcontrollers :: 23.09.2006 12:19 :: DWC :: Replies: 4 :: Views: 16066
To suppose the IR receiver chip will filter out the carrier, and define the modulated carrier is SIGNAL, other is IDLE.
In fact, to decode Philips RC-5/RC-5X (bi-phase/Manchester coding) is similar to others (such like NEC/Sony).
An important trick for robust implementation is: tolerance. (ex: SIGNAL will be short if distance is long)
All of the
Microcontrollers :: 12.10.2006 02:33 :: yager :: Replies: 126 :: Views: 49012