8051 Single Board Computer SBC Version 1 0
8051 Single Board Computer (SBC) Version 1. 0 By Wichit Sirichote kswichit@kmitl. ac. th http: //www. kmitl. ac. th/~kswichit/8051 sbc. html
The 8051 Single Board Computer Serial Interface Real-Time Clock Random Access Memory (RAM) LED Analog to digital converter Input/Output Pins Read Only Memory (EEPROM) DIP Switches Liquid Cristal Display 8051 CPU 11/26/2020 2
8051 SBC Features • CPU: 8051 compatible with 40 -pin DIP package @ 11. 0592 MHz • MEMORY: – 27 C 256: 32 k. B EPROM for monitor program – 62256: 32 KB SRAM for both code and data space • I/O: – direct CPU bus interface 2 x 16 line LCD – 8 -bit input port: 74 LS 244 – 8 -bit output port: 74 HC 573 • MEMORY and I/O Decoder: GAL 16 V 8 D • EEPROM: 24 LC 256: 32 KB serial eeprom • Real-Time Clock (RTC): DS 1307 with +3 V Lithium backup • ADC: LTC 1298, SPI interface 2 -channel 12 -bit Analog-to-Digital Converter • I/O pins: P 1, P 3 of 8051 CPU, 16 -bit I/O port • Debug LED: single dot LED connected to P 1. 7 • Keypad and DIP Switch: 4 -bit keypad and 4 -bit DIP switch • RS 232 Level Converter: MAX 232 • RS 485: 75176 differential transceiver • Serial Interface: 9600 8 n 1 • Monitor Program: Modified PAULMON 2 including new commands 11/26/2020 3
Hardware Schematic, CPU, memory, PLD 11/26/2020 4
RS 232, RS 485, DC supply, EEPROM, ADC, RTC, keypad, debug LED. 11/26/2020 5
Output Port Data output pins • 8 -bit output port address: 0 x 0100 11/26/2020 6
Input Port Data input pins • 8 -bit input port address: 0 x 0200 11/26/2020 7
12 -bit Analog to Digital Converter (ADC) Transfer Curve Output Code 11/26/2020 Source: Linear Technology LTC 1298 8
12 -bit Analog to Digital Converter (ADC) Analog input pin Digital Data output pin • Channel 0 (Pin 2) - Analog Input (e. g. from 0 to 5 volts) • Data (Pin 6) - The A/D conversion result is shifted out of pin 6 – Data Transfer Format: serial with MSB first • Conversion Time : 60µs • Sampling Rate: 11. 1 Kilo Samples per second (ksps) http: //www. linear. com/pc/product. Detail. jsp? nav. Id=H 0, C 1155, C 1001, C 1158, P 1445 11/26/2020 Source: Linear Technology LTC 1298 9
12 -bit Analog to Digital Converter (ADC) • Handshake between computer and Converter 11/26/2020 10
12 -bit Analog to Digital Converter (ADC) • Handshake between computer and Converter – Transfer of data: from MSB (i. e. Bit 11) to LSB (i. e. Bit 0) 11/26/2020 11
MTK 51 8051 Microcontroller Trainer http: //www. kmitl. ac. th/~kswichit/mtk 51/index. html 11/26/2020 12
MTK 51 8051 Microcontroller Trainer 11/26/2020 13
MTK 51 8051 Instruction Subset • ACALL - Absolute Call • ADD, ADDC - Add Accumulator (With Carry) • AJMP - Absolute Jump • ANL - Bitwise AND • CJNE - Compare and Jump if Not Equal • CLR - Clear Register • CPL - Complement Register • DA - Decimal Adjust • DEC - Decrement Register • DIV - Divide Accumulator by B • DJNZ - Decrement Register and Jump if Not Zero • INC - Increment Register • JB - Jump if Bit Set • JBC - Jump if Bit Set and Clear Bit • JC - Jump if Carry Set • JMP - Jump to Address 11/26/2020 • • • • • JNB - Jump if Bit Not Set JNC - Jump if Carry Not Set JNZ - Jump if Accumulator Not Zero JZ - Jump if Accumulator Zero LCALL - Long Call LJMP - Long Jump MOV - Move Memory MOVC - Move Code Memory MOVX - Move Extended Memory MUL - Multiply Accumulator by B NOP - No Operation ORL - Bitwise OR POP - Pop Value From Stack PUSH - Push Value Onto Stack RET - Return From Subroutine RETI - Return From Interrupt RL - Rotate Accumulator Left http: //www. win. tue. nl/~aeb/comp/8051/set 8051. html 14
- Slides: 14