[ Log In ]
Serial to USB converter with Micro USB cable

USB to Serial Converter

$10.95
Qty:
Thumbnail: Crystal Oscillator 18.432 MHz for UART

18.432 MHz Crystal Oscillator 18pf 30ppm

$0.94
Qty:
Thumbnail: 22 pF Capacitor

22 pF Multilayer Ceramic Capacitor

$0.43
Qty:
Thumbnail: Quartz crystal oscillator - 16 MHz

16 MHz Crystal Oscillator 20 pF Through Hole

$0.75
Qty:
Potentiometer with adjustable knob.

50K Potentiometer Panel Mount (Non Trimmer) With Knob

$2.45
Qty:
3 Foot USB Cable Type A to USB Cable Type A

USB Cable Type A Male to USB Type A Male - 3 FT

$2.65
Qty:
USB 2.0 Cable 10 Foot Type A Male to Type B Male

USB 2.0 Cable Type A Male to Type B Male - 10 FT

$4.80
Qty:
Tumbnail: 62 oz-in NEMA 17 Stepping motors (also called stepper motor)

NEMA 17 Stepping Motor (62 oz-in 5mm single shaft)

$19.95 Out of Stock
Qty:
Image of the Atmega324p

Atmega324P

$8.50
Qty:

Programming: Receiving Data with the UART/USART Communication

Before the receive data can be read, the receive data ready flag must tell us that the data is ready to take. If the RXC (Receive Complete) flag in the UCSRA (USART Control and Status Register A) must be on, so a while (! (UCSRA (1 << RXC)) ); is used to wait for this flag to be set.

If there is more than one USAR/UART, then RXC is RXC0 and UCSRA is UCSR0A.
To receive the data when the data is ready, just assign a variable the value in the URD register:

unsigned char receiveData = UDR;

UDR is UDR0 if there is more than one USART/UART.
Response From: Abu Musa

Too Helpfull

Comments and Additional Information

Have some code to share? Or additional information? Respond here:

You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.

Description:

Code (optional):