SlideShare a Scribd company logo
4
Most read
5
Most read
14
Most read
UART 2010/05/13 by Sean Chen
What’s UART? How to use it ? UART Protocol UART components ARM 926-EJS Flow Chart How to control? UART->Initial UART->Methods How to implement/Debug? RS232 MAX232 IC
What’s UART? UART A  universal asynchronous receiver/transmitter  is a type of "asynchronous receiver/transmitter", a piece of  computer   hardware  that translates data between  parallel  and  serial  forms. UARTs are commonly used in conjunction with other communication standards such as  EIA   RS-232 . Sample case RS232 Ref: http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter
How to use it ? How With the UART, you can add an LCD, bootloading,  bluetooth  wireless ,  make a  datalogger , debug code, test  sensors , and much more!  Key words Bootloading A  boot sequence  is the initial set of operations that the computer performs when power is switched on. The  bootloader  typically loads the main  operating system  for the computer.   Datalogger A  data logger  (also  datalogger  or  data recorder ) is an electronic device that records data over time or in relation to location either with a built in  instrument  or  sensor  or via external instruments and sensors. Increasingly, but not entirely Ref :http://www.societyofrobots.com/microcontroller_uart.shtml
UART Protocol Signal definition TX  transmitter RX  Receiver In asynchronous transmitting,  teletype -style UARTs send a "start" bit, five to eight data bits, least-significant-bit first, an optional "parity" bit, and then one, one and a half, or two "stop" bits. The start bit is the opposite polarity of the data-line's idle state. The stop bit is the data-line's idle state, and provides a delay before the next character can start. (This is called  asynchronous start-stop  transmission).  TX RX RX TX M1 M2
UART components A UART usually contains the following components: a clock generator, usually a multiple of the bit rate to allow sampling in the middle of a bit period.  input and output shift registers  transmit/receive control  read/write control logic  transmit/receive buffers (optional)  parallel data bus buffer (optional)  First-in, first-out ( FIFO ) buffer memory (optional) Ref :http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter
ARM 926-EJS
Flow chart Flow chart Boot Initial Set the UART Check the UART is workable Configure setting …. Initial Done Release 2 operator system used or unused Receive Transmit
How to control ? Memory location // Devices#define  UART 0x3CC00000 // Registers#define (offset) UART0 0x0 Register #define UART_UTXH 0x20 #define UART_URXH 0x24 Mode #define UART_UCON_RXMODE_SHIFT 0 #define UART_UCON_RXMODE_MASK (0x3 << UART_UCON_RXMODE_SHIFT) FIFO control #define UART_FIFO_RESET_TX 0x4 #define UART_FIFO_RESET_RX 0x2 #define UART_FIFO_ENABLE 0x1 UART Display 0x00010000 0x00040000 0x000F0000
UART->Initial Initial iboot uart_setup(); UartHasInit clock_gate_switch(UART_CLOCKGATE,ON); In boot mode, put the clock on, if done release the memory to operator system for(i = 0; i < NUM_UARTS; i++) { … } SET_REG(HWUarts[i].ULCON, UART_8BITS); Set register data to control each UART set uart_set_clk(i, UART_CLOCK_EXT_UCLK0); uart_set_sample_rate(i, 16); uart_set_flow_control(0, OFF); UARTs[i].fifo = ON; UartHasInit = TRUE; Check UARTinitial is ok or not
UART->Methods Methods int  uart_write (int ureg, const char *buffer, uint32_t length); int  uart_read (int ureg, char *buffer, uint32_t length,  uint64_t timeout ); uint64_t timeout Define timeout to retry
MAX232 IC RS232 Test I/O PC host and console mode support
How to implement/Debug? RS232 In  telecommunications ,  RS-232  (Recommended Standard 232) is a standard for  serial  binary  single-ended   data  and  control  signals connecting between a  DTE  ( Data Terminal Equipment ) and a  DCE  ( Data Circuit-terminating Equipment ). It is commonly used in  computer   serial ports . A similar  ITU-T  standard is  V.24 . RS232 pin-map table http://en.wikipedia.org/wiki/RS-232 MAX232 datasheet http://www.datasheetcatalog.com/datasheets_pdf/M/A/X/2/MAX232.shtml
RS232 serial cables pin-table  http://www.lammertbies.nl/comm/cable/RS-232.html Console mode Linux (putty) http://www.vanemery.com/Linux/Serial/serial-console.html http://ed32.blogspot.com/2010/01/ubuntuputty.html

More Related Content

PDF
I2C Bus (Inter-Integrated Circuit)
PPTX
I2c protocol - Inter–Integrated Circuit Communication Protocol
PPTX
UART(universal asynchronous receiver transmitter ) PPT
PPT
Serial Peripheral Interface(SPI)
PPTX
PPTX
I2C introduction
PPTX
AMBA AHB 5
PPTX
8255 PPI
I2C Bus (Inter-Integrated Circuit)
I2c protocol - Inter–Integrated Circuit Communication Protocol
UART(universal asynchronous receiver transmitter ) PPT
Serial Peripheral Interface(SPI)
I2C introduction
AMBA AHB 5
8255 PPI

What's hot (20)

PPT
I2C Protocol
PPTX
AMBA Ahb 2.0
PPTX
I2C Protocol
PPTX
PPT
SPI Bus Protocol
PDF
Session 8,9 PCI Express
PPTX
PPTX
Introduction about APB Protocol
PPTX
Advance Peripheral Bus
PPT
PPTX
SPI introduction(Serial Peripheral Interface)
ODP
PPTX
I2C Protocol
PDF
PPTX
8251 USART
PPT
PPTX
AMBA 3 APB Protocol
PPTX
UART Communication
I2C Protocol
AMBA Ahb 2.0
I2C Protocol
SPI Bus Protocol
Session 8,9 PCI Express
Introduction about APB Protocol
Advance Peripheral Bus
SPI introduction(Serial Peripheral Interface)
I2C Protocol
8251 USART
AMBA 3 APB Protocol
UART Communication
Ad

Similar to Uart (20)

ODP
Intel Quark HSUART
PPT
Lecture 10 _serial_communication
DOC
Microprocessor Basics 8085 Ch-1
PDF
Microprocessor and microcontroller
PPTX
Timing n interrupt.pptx
PDF
Lecture 10 (serial communication)
PPTX
UNIT 2.pptx
DOCX
Uart wiki
DOC
NAVEEN UART BATCH 43
PPTX
Serial Communication Uart soc
PDF
4 ql uart_psb_ds_revc
PPT
UART Protocol For Serial Communication.ppt
PPT
lesson01.ppt
PPT
Gsm presentation
PPT
Gsm presentation
PPTX
Presentation On: "Micro-controller 8051 & Embedded System"
DOCX
Iosystemspre final-160922112930
PDF
Microprocessors and Controllers Chapter 3 8085 microprocessor.pdf
PPTX
Linux Serial Driver
PDF
Io pro
Intel Quark HSUART
Lecture 10 _serial_communication
Microprocessor Basics 8085 Ch-1
Microprocessor and microcontroller
Timing n interrupt.pptx
Lecture 10 (serial communication)
UNIT 2.pptx
Uart wiki
NAVEEN UART BATCH 43
Serial Communication Uart soc
4 ql uart_psb_ds_revc
UART Protocol For Serial Communication.ppt
lesson01.ppt
Gsm presentation
Gsm presentation
Presentation On: "Micro-controller 8051 & Embedded System"
Iosystemspre final-160922112930
Microprocessors and Controllers Chapter 3 8085 microprocessor.pdf
Linux Serial Driver
Io pro
Ad

More from sean chen (20)

PPTX
Demo
PDF
Uvm presentation dac2011_final
PPT
Uvm dcon2013
PDF
Example my hdl
PPT
0021.system partitioning
PPT
0015.register allocation-graph-coloring
PPT
0006.scheduling not-ilp-not-force
PDF
Lecture07
PDF
Lecture04
PDF
Lecture03
ODP
Dominator tree
PDF
Work items
PDF
Work items
ODP
ocelot
PDF
Lect.10.arm soc.4 neon
ODP
Image scalar hw_algorithm
PPT
Virtual platform
PPT
PPT
Serializer
PPT
Defense
Demo
Uvm presentation dac2011_final
Uvm dcon2013
Example my hdl
0021.system partitioning
0015.register allocation-graph-coloring
0006.scheduling not-ilp-not-force
Lecture07
Lecture04
Lecture03
Dominator tree
Work items
Work items
ocelot
Lect.10.arm soc.4 neon
Image scalar hw_algorithm
Virtual platform
Serializer
Defense

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Modernizing your data center with Dell and AMD
Advanced methodologies resolving dimensionality complications for autism neur...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation

Uart

  • 1. UART 2010/05/13 by Sean Chen
  • 2. What’s UART? How to use it ? UART Protocol UART components ARM 926-EJS Flow Chart How to control? UART->Initial UART->Methods How to implement/Debug? RS232 MAX232 IC
  • 3. What’s UART? UART A universal asynchronous receiver/transmitter is a type of &quot;asynchronous receiver/transmitter&quot;, a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with other communication standards such as EIA RS-232 . Sample case RS232 Ref: http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter
  • 4. How to use it ? How With the UART, you can add an LCD, bootloading, bluetooth wireless , make a datalogger , debug code, test sensors , and much more! Key words Bootloading A boot sequence is the initial set of operations that the computer performs when power is switched on. The bootloader typically loads the main operating system for the computer. Datalogger A data logger (also datalogger or data recorder ) is an electronic device that records data over time or in relation to location either with a built in instrument or sensor or via external instruments and sensors. Increasingly, but not entirely Ref :http://www.societyofrobots.com/microcontroller_uart.shtml
  • 5. UART Protocol Signal definition TX transmitter RX Receiver In asynchronous transmitting, teletype -style UARTs send a &quot;start&quot; bit, five to eight data bits, least-significant-bit first, an optional &quot;parity&quot; bit, and then one, one and a half, or two &quot;stop&quot; bits. The start bit is the opposite polarity of the data-line's idle state. The stop bit is the data-line's idle state, and provides a delay before the next character can start. (This is called asynchronous start-stop transmission). TX RX RX TX M1 M2
  • 6. UART components A UART usually contains the following components: a clock generator, usually a multiple of the bit rate to allow sampling in the middle of a bit period. input and output shift registers transmit/receive control read/write control logic transmit/receive buffers (optional) parallel data bus buffer (optional) First-in, first-out ( FIFO ) buffer memory (optional) Ref :http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter
  • 8. Flow chart Flow chart Boot Initial Set the UART Check the UART is workable Configure setting …. Initial Done Release 2 operator system used or unused Receive Transmit
  • 9. How to control ? Memory location // Devices#define UART 0x3CC00000 // Registers#define (offset) UART0 0x0 Register #define UART_UTXH 0x20 #define UART_URXH 0x24 Mode #define UART_UCON_RXMODE_SHIFT 0 #define UART_UCON_RXMODE_MASK (0x3 << UART_UCON_RXMODE_SHIFT) FIFO control #define UART_FIFO_RESET_TX 0x4 #define UART_FIFO_RESET_RX 0x2 #define UART_FIFO_ENABLE 0x1 UART Display 0x00010000 0x00040000 0x000F0000
  • 10. UART->Initial Initial iboot uart_setup(); UartHasInit clock_gate_switch(UART_CLOCKGATE,ON); In boot mode, put the clock on, if done release the memory to operator system for(i = 0; i < NUM_UARTS; i++) { … } SET_REG(HWUarts[i].ULCON, UART_8BITS); Set register data to control each UART set uart_set_clk(i, UART_CLOCK_EXT_UCLK0); uart_set_sample_rate(i, 16); uart_set_flow_control(0, OFF); UARTs[i].fifo = ON; UartHasInit = TRUE; Check UARTinitial is ok or not
  • 11. UART->Methods Methods int uart_write (int ureg, const char *buffer, uint32_t length); int uart_read (int ureg, char *buffer, uint32_t length, uint64_t timeout ); uint64_t timeout Define timeout to retry
  • 12. MAX232 IC RS232 Test I/O PC host and console mode support
  • 13. How to implement/Debug? RS232 In telecommunications , RS-232 (Recommended Standard 232) is a standard for serial binary single-ended data and control signals connecting between a DTE ( Data Terminal Equipment ) and a DCE ( Data Circuit-terminating Equipment ). It is commonly used in computer serial ports . A similar ITU-T standard is V.24 . RS232 pin-map table http://en.wikipedia.org/wiki/RS-232 MAX232 datasheet http://www.datasheetcatalog.com/datasheets_pdf/M/A/X/2/MAX232.shtml
  • 14. RS232 serial cables pin-table http://www.lammertbies.nl/comm/cable/RS-232.html Console mode Linux (putty) http://www.vanemery.com/Linux/Serial/serial-console.html http://ed32.blogspot.com/2010/01/ubuntuputty.html