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).

Filter by
Sorted by
Tagged with
0 votes
1 answer
63 views

Access individual bits of a variable

I'm making a code on a PIC16F628A running at 4 MHz that receives the serial bitstream of a 433 MHz remote. The catch here is that I'm forced to do some rather questionable stuff because the pin ...
fpp's user avatar
  • 159
2 votes
2 answers
172 views

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 ...
fpp's user avatar
  • 159
0 votes
1 answer
133 views

Is it possible to exactly generate n number of clock pulses at half the clock frequency of the Atmega328p?

Let the problem be to exactly generate n clock pulses at half the clock frequency of the Atmel Atmega328p (datasheet here). To generate a PWM at a prescaled clock frequency of the Atmel Amega328p, we ...
chckx592's user avatar
0 votes
0 answers
120 views

SPI Bit bang to enable/read/write EEPROM from TM4C123GXL

I have checked a few bit bang posts here but still couldn't figure it out. The datasheet of the EEPROM is at: Datasheet of FT93C66A I tried to interface with SPI but to no avail, so I decided to use ...
Nicholas Humphrey's user avatar
0 votes
0 answers
221 views

Cannot set up WS2812B LEDs with bit banging and ATmega328P at 16MHz

I have an ATmega328P (16MHz extern, GBoard with SIM900 module). I bought 10 LEDs with WS2812B module. My ATmega works with 3.3V but for LEDs I need 5V so I decided to connect TXB0104. I connected ...
sticker's user avatar
0 votes
1 answer
185 views

How to read the temperature of DS1620 thermometer using PIC16F877A?

Good afternoon. I am trying to figure out how to make a PIC16F877A to read the temperature from the DS1620 sensor. Accordingly to the datasheet of the DS1620, I need to send two nibbles A (AAh) to the ...
Guilherme's user avatar
  • 385
1 vote
0 answers
601 views

Bit-bang I2C implement on DS1307 and Atmega328P problem

I currently implement I2C bit-bang for Master Arduino (AVR) to Read/Write to Arduino Slave using Wire.h and DS1307 RTC. My bit-bang i2c work perfectly with Arduino Slave read 8 bytes without ...
MinhTem's user avatar
  • 13
0 votes
1 answer
167 views

Missing 1 bit shift Bitbang I2C Atmega328p

I implement bit-banging I2C on Atmega328P and met the problem when the Master receives data from the slave. I'm in depression in debugging this code since I found no problem. Master Write work ...
MinhTem's user avatar
  • 13
3 votes
0 answers
215 views

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 ...
Kalcifer's user avatar
  • 235
1 vote
1 answer
156 views

Solution to interface SD card with microcontroller using only 2 pins (I2C/SPI)

So I am trying to add an SD card to my circuit and unfortunately, all I have left are 4 GPIOs, but I was asked to try and find a solution to only use 2. So using 4 is a worst case scenario. I thought ...
Nadir's user avatar
  • 11
0 votes
2 answers
400 views

Is there an IC which converts I2C/UART/SPI (or any standard communication interface) commands directly to DALI2 format? [closed]

Is there an IC which converts I2C/ UART/ SPI commands (or any standard communication interface) directly to DALI2 format? DALI seems similar to 1.2k baud UART in a sense, but is encoded in Manchester ...
Carla H.'s user avatar
  • 410
1 vote
4 answers
146 views

How slowly can you clock an AT25DF641A SPI Flash?

I am have started to try to use a SPI Flash. To better understand how it works, I decided to try to bit bang it with the GPIO on a Raspberry Pi. Everything seems correct, but I do not seem to have ...
Echelon X-Ray's user avatar
1 vote
1 answer
227 views

How does the JTAG TAP react to clock cycling, and why am I unable to get an instruction through?

I am writing a program for bit-banging a JTAG interface. As far as I understood the JTAG interface, it should act like this: On clock rise, the TDI and TMS inputs are sampled, if Shift-IR or Shift-DR ...
Mickaël B.'s user avatar
0 votes
0 answers
80 views

Bit banging synchronous serial protocol on SAME70

I am trying to implement synchronous Serial protocol with SAME70 using board SAME70-XPLD. For that I need to generate clock of 2MHz. For that I am using TC module running at MCK/8 = 18.75MHz (MCK set ...
Sidk's user avatar
  • 161
0 votes
1 answer
162 views

Can I operate TLC5947 24-Channel, 12-Bit PWM LED Driver by just manipulating GPIO pins on Jetson Nano?

It is often written that Neopixels are not directly controllable by manipulating GPIO pins on SBCs because the precise timings cannot be met, especially when from user space. I need somehow to drive ...
h22's user avatar
  • 901
0 votes
1 answer
79 views

Generating bit stream in hardware. Glitches with Arduino

Background I have a bit sequence that I want to transmit through a digital output. My first attempt was to use direct port assignment on an Arduino. I set the duration of each level with noops. For ...
DavidG25's user avatar
  • 1,234
0 votes
1 answer
306 views

Master SW (bit-bang) I2C with Interrupts?

I've written a set of "bit-bang" software routines for the PIC18F2620 device. These routines work well for reading and writing 24LC256 EEPROM and DS1307 RTCC devices for the most part. (I wrote this ...
Doug12745's user avatar
  • 319
1 vote
1 answer
76 views

Byte-Banging 2 8051's using port addresses

Currently I have two microcontrollers setup in which entire ports are connected to each other (P1.1 connected to P1.1, P1.2 connected to P1.2, etc). I also have two pairs of extra GPIO pins connected ...
Mike -- No longer here's user avatar
3 votes
1 answer
358 views

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 ...
David Brown's user avatar
0 votes
1 answer
502 views

Simpler code than bit banging to get multiple serial hardware working with 8051

I created a circuit like the following: I have sub-circuits that all take serial data as input and do miscellaneous processing with it. Most of the sub-circuits are just light displays. I want to ...
user avatar
1 vote
2 answers
583 views

One master to 32 slave pic microcontroller communication, bitbang

I'm trying to communicate with 32 microcontrollers (PIC 12f675). These are used to control 32 DC motors and 2 sensor for each PIC. So only two pins are left to communicate with master device. I want ...
Asith Niwantha's user avatar
0 votes
1 answer
4k views

STM32: Manchester coding bit banging implementation problem

I want to use Manchester Coding for my DALI Master-slave project. I am using two boards for this project, one is STM32E407 and the other is STM32F3Discovery. As an initial step, I want to test for ...
charansai's user avatar
  • 461
1 vote
0 answers
317 views

Half-duplex Bit-Banged Port for 8051 microcontrollers too slow?

I was looking at: https://www.maximintegrated.com/en/app-notes/index.mvp/id/3524 and it claims that one can achieve over 2mbps on a 32Mhz clock when bit-banging with an 8051. That means 1mbps on 16Mhz....
user avatar
0 votes
0 answers
228 views

pic bitbang SPI library with variable frame lenght

Im trying to send an SPI frame that is 12 bits long using a pic 16F1455. Im afraid i cant do this using the hardware SPI module , which has a fixed lenght of 8 bits. I think i can do this with ...
Cristian Mardones's user avatar
2 votes
2 answers
519 views

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 ...
BartholomeusR's user avatar
2 votes
2 answers
638 views

When do you release and re-aquire control over SDA around an i2c Ack?

I am having odd behavior with Energia's Wire library, so I figured that I would attempt to do i2c myself. I'm writing my own (bit-bang) implementation if i2c and keeping it pretty simple. For now, I ...
Curtis's user avatar
  • 341
0 votes
1 answer
752 views

SDIO bit banging

I need to interface a wifi chip to my ARM 9 board, it does not have in built SDIO so i am thinking to interface via bit banging. Questions: Is it possible to interface SDIO via bit banging If not ...
Transformer's user avatar
2 votes
1 answer
900 views

STM32 handmade USART driver

I designed a new electronic card which has a STM32F4 microcontroller on it. Each peripheral except the Wifi module works. Wifi module is supposed to communicate with the controller via USART channel ...
sanchop22's user avatar
  • 141
1 vote
0 answers
203 views

Can I use GPIOs to bit-bang in SENT protocol

I want to use a STM8 controller for a project(as I am familiar with micro).This controller gets the data from sensor and process it and sends data to another ...
GShaik's user avatar
  • 167
2 votes
2 answers
342 views

Prevent bit-bang data-in line from back powering device?

I'm building a Z80 machine from components, to talk initially to a PC via bit banged I/O through an FTDI USB cable, and I've little idea how best to avoid back powering the Z80 board from a 5V data in-...
El Zorko's user avatar
  • 123
0 votes
0 answers
869 views

Is it a problem with SPI bit-banging or the mode

After hours of debugging the SPI send bit-banging function and probing, I have come to a point where I could no longer understand whats causing the Si4455-RFIC to always return response of 0x00, ...
PsychedGuy's user avatar
5 votes
1 answer
1k views

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 ...
FlashCactus's user avatar
1 vote
1 answer
196 views

UART works when I open minicom before starting UART

I am trying to send out large amounts of data at 115200 via UART. I have come across a rather strange problem. I am sending out data in the while loop of the MCU. The MCU is not doing anything else. I ...
red car's user avatar
  • 345
1 vote
2 answers
151 views

16 separate lines via USB

So let me start apologizing if the question doesn't make any sense at all, I'm a total noob and I haven't quite grasped most of the concepts yet. I have designed this small visual indicator, which ...
nxet's user avatar
  • 143
1 vote
1 answer
2k views

Verilog outputting specific bit from register to output; getting constant 1's

I am trying to create an program that bit bangs a value from an FPGA to an arduino. In the module I created, every other clock cycle, the FPGAdata output should be set to the next bit of t. The ...
Eric Johnson's user avatar
1 vote
3 answers
2k views

I2C: Unable to Read Multiple Byte using Bit-Banging method

I am using Bit-Banging for I2C communication via PIC24FJ128GA010. The code works fine for writing 16bytes to EEPROM ( I recieved ACK = 0 for every Byte write ). While reading EEPROM I am able to ...
skg's user avatar
  • 249
5 votes
3 answers
2k views

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 ...
bouqbouq's user avatar
  • 583
1 vote
2 answers
1k views

ATtiny2313 vs ATtiny84 software compatibility

I make and sell a variant of the USBtiny AVR programmer. It uses an ATtiny2313 clocked at 12 MHz and does bit-banged USB using hand-tuned assembly language (that someone else wrote - it's an open ...
nsayer's user avatar
  • 1,553
1 vote
3 answers
488 views

Approach to 8 channel bit banging

I'm looking at controlling some WS2812 5050 RGB LED strips from a microcontroller. I've successfully played with the Adafruit Neopixel library and I've written some code on a PIC18F2455 which I've ...
Jon Marnock's user avatar
0 votes
1 answer
216 views

Getting 5V Output on FT245RL

I've got Sparkfun's FT245RL Usb to Fifo Breakout Board. I need 5V output from data bit ports(D0-D7). While I'm working with it, I've found out I need to unsolder SJ1 jumper between Vcc and Vccio then ...
st.'s user avatar
  • 103
2 votes
0 answers
1k views

Asynchronous Bitbang mode vs Synchronous Bitbang mode

I am still newbie in the field of electronic, and I have to write program to flash LED light as well as receive light data via photodiode. I am currently using FT2232H mini module. I have trouble ...
user38285's user avatar
2 votes
1 answer
491 views

Bit-banging I2C question

When bit-banging I2C using 2 PIO lines do these lines still need to be pulled high? Obviously using a dedicated I2C bus the lines must be pulled high as the pins are open-drain outputs but PIO pins ...
user28350's user avatar
  • 117
4 votes
1 answer
1k views

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. ...
user3421560's user avatar
3 votes
3 answers
3k views

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) ...
fadedbee's user avatar
  • 994
6 votes
3 answers
20k views

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 ...
osgx's user avatar
  • 665
1 vote
1 answer
956 views

Parallel NOR Flash ROM in-system programming issue (Micron M29F160)

I'm attempting to program a Micron M29F160 Flash ROM (datasheet) that is memory-mapped into a larger system, and I want to program it from the external interface of that system, but I can't seem to ...
qwertymodo's user avatar
1 vote
2 answers
698 views

Bit-banging a ShifBrite led driver with a PIC

I am having problems making communicate a Shiftbrite A6281 led driver with a PIC18F4550. What I am trying to do is to send the RGB values to the driver in order to select the color of the led, but I ...
Str1101's user avatar
  • 111
4 votes
3 answers
897 views

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 ...
Tar's user avatar
  • 163
-2 votes
1 answer
452 views

Bit-bang TX problem

I need some help. I had to create a new serial for my motherboard. I decided to emulate a serial via bit bang. The code is below. I am finding problem in my code sync bit bang with a traditional RS232 ...
Nabil's user avatar
  • 1
5 votes
1 answer
9k views

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 ...
Jeroen's user avatar
  • 93