Search Engine www.edaboard.com

Bit Banging Code

Add Question

1000 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 (...)
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.
I have issues in spi communication in bit banging technique.. As of now am able to send/write data to the peripheral... it works fine as expected.. But when i try to read data from the same peripheral but the recieved data is not as expected.. Am using a standard library code for bit banging...and i ve (...)
Hello Friends, I am trying SPI bit banging approach to interface ADC 0832 with AT89C51RD2. I have written following code for same purpose; however I am not able to develop logic for receiving a serial data from ADC 0832 and convert it into readable/usable byte to transmit received byte to PORT 2. Please find the attached (...)
This bit counting code snippet idea was took from chip design (VHDL) people and implemented in ST to count number of active switch (arrange in 16 bits word) or to detect co-incident switches. It is fast, no looping, complete in single scan cycle. Can modify to support less or more bits. FUNCTION_BLOCK (...)
Hello all, I encounter a problem that a 7k bit length code have several error (mostly 3 bit error). And the 3 bit error are burst error(i.e. they are nearby in a small region). Only 3 bits in 7 kilobits are wrong? That is very easy to correct. Worst case would be 2 bytes that are (...)
I2C or SPI communication from PC to the target device (through an interface hardware) is bit-banging.
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
amol_shah is right, It depends on the crystal and the uC you're using. For example, in most 8051 based uC's, a machine cycle takes 12 clocks cycles, so with a 11.0592 MHz crystal (kind of a standard value when serial communications is held), you have 11.0592 MHz / 12 = 921600 machine cycles per second. If you want to transmit at 9600 bps, you wi
Have to do a 4-bit counter code in VHDL. It hads a 4 line input (A) a 10Hz CLK input a load input which is asynchronous a UP/Down (Down is Not down) and is synchronous a Reset input which is asynchronous a 2 line setect input line (x) a 2 line setect input line (y) a 4 line output (count) a one line output called (xeq Y) Does anyone kn
Have to do a 4-bit counter code in VHDL. It hads a 4 line input (A) a 10Hz CLK input a load input which is asynchronous a UP/Down (Down is Not down) and is synchronous a Reset input which is asynchronous a 2 line setect input line (x) a 2 line setect input line (y) a 4 line output (count) a one line output called (xeq Y) Does
1- ENTITY toto IS END ENTITY toto; ARCHITECTURE tb OF toto IS END ARCHITECTURE tb; 2- "wait for 10ns", need space between value an unit 3- for vector with more than one bit, using "00" instead '0', '00' not allowed to have more clear code, a 16bits can be written like this a_in <= x"1234"; means one digit is (...)
I'm trying to set up a technique for serial communications using the pic16f887 and the Hitachi H48C 3-Axis Accelerometer. I'm new to bit banging and I know I need to find out how to do it to send data to the h48c. I'm finding loads of example codes in basic stamp but I'm trying to convert it to c and its not easy, for me anyway Wondering if (...)
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,
Hello all, I recently designed a 3 bit gray code counter, however the simulation did not turn out as intended. Could any of you view my code and inform me as to where I went wrong. Thanks ------------------------------------------------------------------------------------------------------------ library IEEE;
Can someone give me exactly the code of bit banding using LPC4357 set pin 9_5 GPIO5 high ?
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 (...)
HI, i want LCD HD44780 8-bit MODE source code in c-language. I am using HIGH TECH PIC-Clite compiler for PIC16F877. So plz if anyone have this code then send it to me. usman_star2@hotmail.com Thanx n advance
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
This code is suppose to be vhdl for a 4 bit ALU library ieee; use ieee.std_logic_1164.all; use work.all; entity normalalu is port (A, B: in std_ulogic_vector(0 to 3); O : out std_ulogic_vector(0 to 4); S : in std_ulogic_vector (0 to 1)); end normalalu; architecture behavior of normalalu is begin reg:process(
hi, i have problem in changing 4 bit lcd module to 8 bit lcd module. i have source code of temperature sensor using ds1820 which display temperature on 4 bit lcd module. however, my lcd can only run on 8 bit module. can anybody show me how to change it? i am using ccs c compiler. i attach here with (...)
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
Nice, everythime someone talks about a register, we replace with shift-register :-) The problem with this kind of "shift" register code is that there is no synchronisation available, when do you know 32 bits are loaded? Do you need to shift every clock edge? Maybe he's looking for shifing out instead of shifing in? Left or right shift?... I think
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 all, We are working on Elm Chan's FF system with our MSP430F5438. We connected SD with SPI interface, modified the code for this purpose. When debugging, we have some problems, we cannot create a file, write in it or close it. When we examine through breakpoints, we have seen that disk is not initialized. The code below is proceding with "
A problem throughout this thread is that it's cheerfully mixing example codes for different processors and compilers without showing the exact IO library definitions. We experienced a similar problem in another recent thread. Of course, the LCD handling as such can be easily ported between processors.
which compiler you are using following explaination for 8051 and keil compiler. first you have to define bit as sbit pin1=P1^0; sbit pin2=P1^1; above main function. then compare the recieved character with you data as you given if(receiv_data == 0x9D) pin1 = 1; else if (receiv_data == 0xBC) pin2 = 1;
hi can anyone give me optimized 4 bit grey code counter. i want equation for bit 0-3 ..... ~niks~ In what way do you whant the answer? C code, VHDL, gates, ....? 0000 0 0001 1 0011 2 0111 3 1111 4 1110 5 1100 6 1000 7 Regards
Hi all, i have a gigatronics 12720A microwave synthesizer and want to use it to generate 13 bit Barker code at 200Mhz carrier wave for testing my signal receive block. can anybody tell me how to do thanks in advance
How would you translate this piece of code from Verilog to VHDL: =============== The following translation does not pass syntax check: slck_en <= to_bit(count1x = "10010"); assuming slck_en is of type bit and count1x is std_logic_vector(4 downto 0); Thanks neocool count1x = "10010" produces a type boolean
Since you know how to read the inputs from single pins, I'd assume you know how to output to a single pin too. The START bit is simply an output-low bit, and the STOP bit is simply an output-high bit. As I said before, bit-banging is just manipulating the bitwise output to (...)
hi every body plz send me a vhdl code for crcc of protocol 802.11a, implementable in fpga.
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
i need a bit of code that takes BCD from the RS232 port and converts it in to BINARY and displays it on PORT B with 8 leds. This needs to be simple for a newbe like me. is there any one that could help with this thanks
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
hi, I've done a bit of work with manchester (biphase) coding. It all depends on the datarate, and what exactly this 'manchester data' is. The 628 as far as I know can only manage 5MIPS. Also, is this a packet structure, or a continuous stream? If continuous, you'll have to do any processing between bits (manchester bits, not a data (...)
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
Hi, This is a pretty basic quesiton, but I can't seem to find a satisfactory answer, and considering its used in almost all digital comms, I thought I'd try here. Without designing custom IC's, or using programmable logic (FPGA/CPLD) how exactly could one 'stream' bits for wireless or wired communication? What I mean is..say we have to sen
how to set (example the 10th bit of MSB) in a micro controller of 16 bit Here's a snippet of C code that will set bit 10 within a 16 bit value: value |= (1 << 10); If the value is accessed by multiple threads then it might be a good idea to do it this way to ensure an atomic operation is performed: [c
Here are the key lines of code for a 19-bit LFSR, which generates a PRBS. The output is simply lfsr bit 0. reg lfsr=0; always @ (posedge clock) lfsr <= {lfsr, ~lfsr^lfsr^lfsr^lfsr}; If you need a different cycle length, try this Xilinx app note:
below is a 8-bit shift and add multiplier code in vhdl. u can take it as reference and design a 16-bit multiplier. --------------------------------------------------------------------------- -- The multiplier --------------------------------------------------------------------------- entity multiply is port (load, clock :in b
I need a C code for detecting motors speed. A 2-channel shaft encoder is attached to the motor which outputs 2-bit gray code. max velocity of the motor is 189 rpm I am using a PIC18F Microcontroller Please help me, Thanks in advance