how is the UART communication done through that code?
i need some explanation about start and stop bit in UART.
UART Communication transmit and receive data serially at particular baud rate.
In the above mentioned code Data transmit from external device to FPGA kit at 9600 Baud Rate.
UART Communication consist of
Start Bit (High to Low)
DATA 8 Bits
Parity Bit (optional)
Stop Bit (Low to High)
Each bit need to be transmitted at particular speed
(FPGA Clock frequency / Baud Rate) = 50 MHz / 9600 = 5208 approx.
we implement the 5208 counter and receive each bit and store them in array.
With the array value, it ON/OFF external relay.
Hope it helps.
i want to interface spartan 3 stick board with microcontroller with rs232
my microcontrollers output voltage is 5V
fpga will receive the data and will process further
i want to know whether i will need a level shifter or not on fpga side?
No need to use level shifter. I hope you are communicating through uart port with db9 connector then you can interface directly connect through uart port. Don't connect directly to any of the fpga I/O lines. It will damage fpga.