Questions tagged [bit-bang]

A software implementation of a digital data stream on a digital I/O line. Bit-banging is opposite to using specialized hardware such as UART, MSSP (in PICs), USCI (in MSP430).

Typically used when there is no hardware resource available to use for the serial protocol, this would involve changing the state of an I/O line with appropriate time delay loops.

This can be any of a variety of protocols, including RS-232 serial, I²C, SPI, etc.

55 questions
6
votes
3 answers

Max switching frequency of GPIO pins of modern cheap FPGA

How can we estimate maximum switching frequency of GPIO FPGA pins? What is maximum data rate achievable when connecting two FPGAs together without using of integrated high-speed transceivers? Or when we are bitbanging GPIO to VGA, what is maximum…
osgx
  • 665
  • 1
  • 10
  • 19
6
votes
3 answers

i2c external pullup kills communication

I am using an MCP23017 (which shouldn't matter tho) to extend the number of GPIO pins of an arm based linux computer using i2c-dev bitbanging. It all works fine with wires of a few centimetres. The problem is that i would need 2*~3m wire in between…
Gung Foo
  • 163
  • 5
5
votes
1 answer

How to write to 93LC46B EEPROM from an Arduino using SPI

I have a question regarding eeproms and an Arduino (I am using Arduino Uno). I have the following eeprom: 93LC46B. From the datasheet I understand that in order to write the integers 1 and 2 to the first address I need to send the following bits: 1…
Jeroen
  • 93
  • 1
  • 6
5
votes
1 answer

Significance of bias when driving an LCD

I've got hold of several bare-glass T218010 LCDs and would like to drive them with a bare MCU (or, rather, an MCU plus a couple latched-output SIPO shift registers such as 74HC595). However, the only useful information I've found on the topic of…
FlashCactus
  • 811
  • 7
  • 13
5
votes
3 answers

Is the SPI Interface just a protocol or actual hardware?

I want to use the SPI interface between a PIC and an ENC28J60. However, there are no pins on the PIC called MISO or MOSI that I can use for SPI. So is SPI just a protocol, which I can use with any PIC pin (by just using any I/O pin, for example, in…
bouqbouq
  • 583
  • 8
  • 27
4
votes
3 answers

Terminology question: does the term "bit-banging" implies not using external signal edge interrupts for timing?

Assuming I realize some communication protocol (e.g. SPI or I2C) just with GPIOs (no dedicated HW). In order to handle timing, I can either: set interrupt on the CLK edge set timer interrupt and test the DATA line periodically Option 1 uses…
Tar
  • 163
  • 3
4
votes
1 answer

FTDI-based programmer works with ATmega but not ATtiny?

I'm using an FTDI-based bit-bang programmer for my AVR MCUs with AVRDUDE. It works perfectly with ATmega32A, but does not work with ATtiny45. The command that I use to try if it works is: avrdude.exe -c pinb -P ft0 -B 4800 -U lfuse:r:-:h -F The -c…
Goodrone
  • 211
  • 1
  • 5
4
votes
5 answers

Arduino software serial - full duplex

I need two serial ports for this Atmega328 Arduino project, but this processor has only one hardware UART. The processor, hardware design, and programming environment are already set, and I cannot change the hardware or processor at all, so a…
Adam Davis
  • 20,339
  • 7
  • 59
  • 95
4
votes
1 answer

bitbanging i2c problem with ACK from slave

I am trying to implement bit-banging i2c to communicate between an atmega128A's GPIO and an SHT21 (I2C bus was used for some other devices). The first task is to send a write sequence to the SHT21. Using an oscilloscope, I can see that the sequence…
3
votes
0 answers

Bit Timing Issues With a Software UART

(EDIT a big portion of the original question has been somewhat answered so it is out of date. For a more up to date version of what I am looking for now, please skip to EDIT 2, and use the following as just a reference for context.) I am trying to…
Kalcifer
  • 235
  • 1
  • 12
3
votes
1 answer

When should I change a logic level and how long should I hold it?

I'll start out by saying I'm a total newbie to this stuff, so I apologize if this is a silly question. For context, I'm trying to bit-bang the Low Pin Count bus using a FT232H. Here's a timing diagram from the LPC specification: Here's a logic…
David Brown
  • 341
  • 2
  • 10
3
votes
2 answers

SPI flash memory doesn't work without huge delays

For my graduation work I am developing a microcontroller system where the MCU (MSP430FR5739) talks to an SPI flash (SST25VF080B to be particular). I've achieved this without using the eUSCI SPI master (by bit-banging the thing) but no matter what,…
ozg
  • 373
  • 1
  • 2
  • 8
3
votes
3 answers

How fast can ARM Cortex M0s/M3s bit bang?

I have not yet used ARM Cortex uCs, only AVRs Firstly, how fast can they: Stream 1024+ bits (serially, from bytes in RAM) out of a pin, with no pauses/jitter Stream 1024+ bytes (parallel, from RAM) out of 8 pins, with no pauses/jitter I'm…
fadedbee
  • 994
  • 9
  • 24
2
votes
2 answers

How can I receive the bitstream of a 433 MHz remote on PIC16F628A only using timer2?

I'm trying to interface a 433 MHz receiver module with a PIC16F628A, running at 4 MHz from the INTOSC. The idea is that using a generic 433 MHz remote, I could pair it to the uC and toggle some outputs depending on what button was pressed. Given…
fpp
  • 159
  • 9
2
votes
2 answers

Does clock speed matter when recovering from I2C bus lock up?

When there is I2C lock caused by slave device driving the SDA line low you need to manually generate a few clock signals by doing a simple bit banging on the SCL pin. I thought that this need to be done with the same frequency as the I2C…
1
2 3 4