Home
ESA MCB 51 User Manual CONTENTS
Contents
1. PO 7 o CO N 0 of A O N Vcc oO Gnd J1 10 Pin Male Connector for Port P2 Pin No on J1 P2 1 P2 0 P2 1 P2 2 P2 3 P2 4 P2 5 P2 6 P2 7 o CO NI 01 A O N Vcc oO Gnd OAD QO J2 10 Pin Male Connector for Port P1 Pin No on J2 P1 k P1 0 P1 1 P1 2 P1 3 P1 4 P1 5 P1 6 P1 7 o CO NI 01 A O N Vcc oO Gnd J2 10 Pin Male Connector for Port P3 Pin No on J2 P3 1 P3 0 P3 1 P3 2 P3 3 P3 4 P3 5 P3 6 P3 7 o CO NO A A O N Vcc i O Gnd ESA MCB 51 User Manual 18 LCD 15 Pin Flow strip connector for LCD interface Pin No on Connector LCD Signal PORTS interfaced 1 Vss Gnd 2 Vdd Vcc 3 Contrast Control 4 RS Reg Select P3 7 5 R W Read Write P3 6 6 E Enable P3 5 7 DBO P2 0 8 DB1 P2 1 9 DB2 P2 2 10 DB3 P2 3 11 DB4 P2 4 12 DB5 P2 5 13 DB6 P2 6 14 DB7 P2 7 15 Back Light Hard wired to Vcc UAD ESA MCB 51 User Manual DE J7 26 Pin Male Connector for Ports PO P1 and P2 Pin No on J7 PORT Line Pin No on J7 PORT Line 1 P2 4 2 P2 5 3 P2 2 4 P2 3 5 P2 0 6 P2 1 7 P1 6 8 P1 7 9 P1 4 10 P1 5 11 P1 2 1
2. B File Edit View Project Debug Flash Peripherals Tools SVCS Window Help AcHa BB Ss E t os Fo Gu d Project Workspace x 01 a ESA MCB 51 02 AVD OL mm a ate Options for Group Source Group 1 Sh 05h E Rebuild target Oh ee Build target F7 Add Files to Group Source Group 1 eB Manage Components Remove Group Source Group 1 and it s Files Include Dependencies T JALALA OAD ESA MCB 51 User Manual 6 Wo 3 Set the Target options for the ESA MCB 51 as shown below Project Options for Target opens the u Vision2 Options for Target Target configuration dialog Set the Xtal frequency as 11 0592 Mhz as per ESA MCB 51 Options for Target ESA MCB 51 Small variables in DATA E Large 64K program E 4 Since the ESA MCB 51 Monitor uses the code memory area from 0x0E000 to OxOEFFF the user application source need to use memory from 0x0000 to OxODFFF Compile the written source and set the required debug options as shown below OAD ESA MCB 51 User Manual 7 Wo Options for Target ESA MCB 51 isl o Keil Monitor 51 Driver xl pesiou feateo2 pes fee OOOO Cancel Defauts he 5 Select Use Keil Monitor 51 Driver in the Options for Target Debug page To load and start user application enable Load Application at Startup option 6 Select appropriate communication settings using the Settings button in the Debug page as shown b
3. The connector details are as follows 1 4 Ports on 4 different 10 Pin connectors PORT CONNECTOR PO J1 P1 J2 P2 J3 P3 J4 2 The Ports PO P1 and P2 are on 26 Pin connector J7 User can make use of the above connectors for different interfacings and also care has to be taken while interfacing the same port lines on the different connectors 3 3 lines from P3 i e P3 7 P3 6 P3 5 and 8 lines from P2 are used to interface the on board LCD 4 On chip UART lines i e P3 0 and P3 1 are used for serial interface IMPORTANT NOTE Since the same the Port lines are available in different connectors for different interfacing options the user should take care about using the same port lines on different connectors i e the port lines that are under use in one connector should not be used in other connectors However in some exceptional cases this can be done without any conflict OAD ESA MCB 51 User Manual 13 UDE 3 4 SERIAL INTERFACE The on chip UART is used for serial interface with the PC these signals are level shifted using MAX232 for RS 232C compatibility The RS 232C signals are available on RJ11 connector J6 The ESA MCB 51 monitor uses the on chip UART to communicate with the Keil u Vision debugger 3 5 LCD INTERFACE A 16x2 LCD is interfaced to the port lines of MCU User application programs can make use o this LCD as a console 3 5 1 Description of the LCD Module These modules come in variety of formats like 8x1
4. eight characters per line and one line 8x2 eight characters per line and two lines 16x1 sixteen characters per line and one line 16x2 sixteen characters per line and two lines 20x2 twenty characters per line and two lines 20x4 twenty characters per line and four lines etc LCD accepts characters in ASCII format Character display font in LCD module is by matrix of dots i e each character in LCD module can be represented by 7x5 matrix 7 rows and 5 columns of dots or 10x5 matrix 10 rows and 5 columns of dots This interface is built over 16x2 LCD module in which the display data RAM address of LCD module for the first line starts from 00H to 14H and the second line starts from 29H to 3CH The following table shows the interfacing details of the LCD OAD ESA MCB 51 User Manual 14 UDE 3 5 2 LCD Pin Description and Interface to MCU PIN SYMBOL FUNCTION PORT on MCU 1 Vss Ground 2 Vcc 5v supply 3 Vo LCD contrast control Register Select RS 0 4 RS Instruction P3 7 register RS 1 Data Register Read Write 5 R W 1 Read P3 6 0 Write 6 E Enable P3 5 7 to 14 DBO to DB7 Bi directional data bus P2 0 to P2 7 15 L Back light power of 5V Hard wired to Vcc LCD module has an automatic reset which is critically dependent upon power supply voltage Voltage has to rise from 0 2v to 5v within 10 to 15ms for the LCD to reset Since this is not accurate we choose to give some delay in the application program while initializing it The B
5. 79 121 y 5C 92 7A 122 z 5D 93 7B 123 5E 94 A 7C 124 BF 95 2 7D 125 y 60 96 7E 126 61 97 a 7F 127 DEL Od ESA MCB 51 User Manual NYO 27
6. data length S C 0 cursor move N 1 2 display lines R L 1 shift to right N 0 1 line R L 0 shift to left F 1 10x5 dots B 1 blink on F 0 7x5 dots B 0 blink off D 1 display on AC address D 0 display off C 1 cursor on BF 1 LCD Busy C 0 cursor off BF 0 can accept instruction or data UAD ESA MCB 51 User Manual w UDE 3 6 INTERRUPTS External Interrupts The INTO and INT1 interrupts are available to user these are provided with on board switches Internal Interrupts On Chip Timer interrupts are available to user The ESA MCB 51 monitor program uses the on chip serial interrupt so this should not be used in application programs 3 7 CONNECTOR DETAILS The ESA MCB 51 comprises of eight different connectors in addition to one 40 Pin connector site 3 7 1 CONNECTOR DESCRIPTIONS J5 Power Connector or Jack J1 10 Pin connector for Port PO J2 10 Pin connector for Port P1 J3 10 Pin connector for Port P2 J4 10 Pin connector for Port P3 LCD 15 Pin Flow Strip Connector for LCD J7 gt 26 Pin connector fro Ports PO P1 and P2 J i RJ11 connector for RS 232C signals J8 40 Pin connector site for all CPU signals UAD ESA MCB 51 User Manual u QO 3 7 2 CONNECTION DETAILS AND SIGNAL DEFINITIONS J5 5 Volts Power Jack Center ve Outer Gnd J1 10 Pin Male Connector for Port PO Pin No on J1 PO P0 0 PO 1 P0 2 P0 3 P0 4 P0 5 P0 6
7. i e PWM and Capture amp Compare e SPI Serial Peripheral Interface on Port1 e Full duplex enhanced UART INTERRUPTS Nine sources of interrupt both external and internal Two External interrupts INTO and INT1 are provided with push button switches these can also be used as general purpose switches INTERFACE SIGNALS CPU All the CPU signals available on a 40 pin connector site I O Port Lines PO P1 and P2 Port lines are available on a 26 pin connector compatible to ESA Interface Modules Four 10 pin connectors for all the 32 I O lines LCD LCD compatible signals are available on a 16 Pin flow strip connector SERIAL I O On Chip UART signals are available through MAX 232 on a RJ 11 connector OAD ESA MCB 51 User Manual 2 UDE 1 3 GENERAL DESCRIPTION 1 3 1 BLOCK DIAGRAM PC with KEIL uVision UART RS 232 LCD vig ROOT Flash memory 256 Byte RAM 1792 byte XRAM 2048 bytes EEPROM EN 26 Pin Connector AT89C51ED2 RD2 uC gt The ESA MCB 51 is built around AT89C51ED2 RD2 this board provides a platform to user to evaluate the on chip features of 8051 family microcontrollers Please refer the datasheet of AT89C51ED2 RD2 for more details of the chip The 32 I O lines of the microcontroller are available to user on different connectors Please refer Hardware chapter for more details on these connectors A 16x2 LCD which is interfaced to 11 port lines is available
8. right depends on the values stored in B OFOh and RO registers B 00h Shifts the Cursor to Left side B 01h Shifts the Cursor to Right side RO No of positions to be shifted 0E35Ah GOTOXY Moves the Cursor to X Line Y column Store Line number in B OFOh register and Column number in RO register The On Board LCD consists of 2 Lines and 16 Columns B 00h for Line 1 B 01h for Line 2 0E380h LCDSTR Displays the string pointing by DPTR register and the string should be terminated with 00h Store the starting address of the string in DPTR register and the string should be stored in CODE memory 0E39Eh HEX2ASCII Function This Routine converts the lower nibble of accumulator to ASCII number Input Store the number to be converted in lower nibble of Accumulator A register Call Address 0E3B0h ESA MCB 51 User Manual 23 4 2 LCD LIBRARY FUNCTIONS User can use this Library to do operations on board LCD The Library files includes 1 LCD LIB 2 LCD H User has to add this LCD LIB file to the source group of the Project to include LCD H in the source code file C Language Examples are given in the CD ROM which includes the LCD library The functions available in this library are given below 1 void InitLcd Description Initializes LCD for minimum settings i e Func Set 8 bit data 2lines of display 5x8 dots Clear display Disp on amp Normal Cursor amp Address of first line 2 void LcdCmdWrite unsigned cha
9. settings like 5x7 font No cursor amp Blink off Clear display etc 0E267h LCDCMD Writes the Commands to the Instruction register of LCD Store the Command byte in accumulator i e A register 0E295h LCDDAT Writes the ASCII Characters to the Data register of LCD Store the ASCII Character in accumulator i e A register 0E2B4h LCDSTATUS Reads the Busy Flag of LCD and comes out the routine when Busy Flag becomes low 0E2D3h DELAY Provides 500 usec delay the R2 register can be used multiply the base delay i e to increase the time delay Store the delay multiplier in R2 register 0E2EEh CLRLCD Function Clears the LCD module and brings cursor to home Call Address 0E2F9h Name of routine HOMECURSOR Function Brings the LCD Cursor to Home Position Call Address 0E306h ESA MCB 51 User Manual 22 10 11 12 OAD QO Name of routine Function Input Call Address Name of routine Function Call Address Name of routine Function Input Call Address Name of routine Function Input Call Address Name of routine SETCURSOR This routine sets the LCD cursor type the Cursor type has to be stored in B OFOh register B 00h Selects No Cursor B 01h Selects Normal Cursor B 02h Selects No Cursor amp Blink ON B 03h Selects Normal Cursor amp Blink ON Store Cursor type in B OFOh register 0E313h SHIFTCURSOR Shifts the LCD Cursor to left or
10. 2 P1 3 13 P1 0 14 P1 1 15 P0 6 16 P0 7 17 P0 4 18 P0 5 19 P0 2 20 P0 3 21 P0 0 22 PO 1 23 P2 6 24 P2 7 25 Vcc 26 Gnd J6 6 Pin RJ11 Connector for RS 232C Pin No on J6 RS 232C Signals 1 Gnd 2 CRXD 3 CTXD 4 z 5 Gnd 6 J8 40 Pin Connector site for CPU signals All the 40 CPU signals are available on this connector as it is ffom CPU OAD ESA MCB 51 User Manual UDE OAD UDE 3 7 3 RS 232C CABLE CONNECTION DETAILS J6 RJ11 6 Pin to 9 Pin D Type female connector Pin No on J6 RJ11 Pin No on 9 Pin D type 1 O Ol Bo ON I Note indicates No Connection ESA MCB 51 User Manual 21 4 ESA MCB 51 MONITOR ROUTINES AND LCD LIBRARY FUNCTIONS ESA MCB 51 Monitor provides the user with several useful LCD routines that significantly simplifies the task of program development This chapter gives a list of routines provided by ESA MCB 51 Monitor which are accessible to the user with their address Example programs using these routines are given in CD ROM 4 1 MONITOR ROUTINES 1 OAD QO Name of routine Function Call Address Name of routine Function Input Call Address Name of routine Function Input Call Address Name of routine Function Call Address Name of routine Function Input Call Address Name of routine LCDINIT Initializes the LCD with minimum
11. 6 dimension No of Rows 2 i e Y 0 or 1 No of Columns Ofh i e X 0h to Ofh OAD ESA MCB 51 User Manual 25 UDE ASCII CODES HEX DEC CHAR HEX DEC CHAR 00 0 NUL 22 34 A 01 1 SOH 23 35 02 2 STX 24 36 03 3 ETX 25 37 04 4 EOT 26 38 amp 05 5 ENQ 27 39 06 6 ACK 28 40 07 7 BEL 29 41 08 8 BS 2A 42 09 9 HT 2B 43 OA 10 LF 2C 44 0B 11 VT 2D 45 E 0C 12 FF 2E 46 OD 13 CR oF 47 0E 14 SO 30 48 0 OF 15 SI 31 49 1 10 16 DLE 32 50 2 11 17 DC1 33 51 3 12 18 DC2 34 52 4 13 19 DC3 35 53 5 14 20 DC4 36 54 6 15 21 NAK 37 55 7 16 22 SYN 38 56 8 17 23 ETB 39 57 9 18 24 CAN 3A 58 19 25 EM 3B 59 1A 26 SUB 3C 60 lt 1B 27 ESC 3D 61 E 1C 28 FS 3E 62 gt 1D 29 GS 3F 63 1E 30 RS 40 64 o 1F 31 US 41 65 A 20 32 SP 42 66 B 21 33 43 67 C OAD ESA MCB 51 User Manual UDE HEX DEC CHAR HEX DEC CHAR 44 68 D 62 98 b 45 69 E 63 99 c 46 70 F 64 100 d 47 71 G 65 101 e 48 72 H 66 102 f 49 73 67 103 g 4A 74 J 68 104 h 4B 75 K 69 105 4C 76 L 6A 106 j 4D 77 M 6B 107 k 4E 78 N 6C 108 4F 79 O 6D 109 m 50 80 P 6E 110 n 51 81 Q 6F 111 0 52 82 R 70 112 p 53 83 S 71 113 q 54 84 T 72 114 r 55 85 U 73 115 S 56 86 V 74 116 t 57 87 W 75 117 u 58 88 X 76 118 v 59 89 Y 77 119 W 5A 90 Z 78 120 x 5B 91
12. CB 51 uses 6K bytes of on chip flash for monitor program the monitor program ranges from E000h to F800h The Boot Loader provided by Chip Vendor for ISP In System Programming ESA MCB 51 User Manual 1 OAD UDE 3 2 2 occupies 1K bytes of flash memory from FCOOh to FFFFh User has to make sure that the user application program should not use the Monitor and Boot Loader memory ranges The diagram given below shows the Code or Program memory layout of ESA MCB 51 CODE 0000h Memory USER APPLICATION AREA 56K bytes DFFFh E000h MONITOR 6K bytes F800h USER AREA 1K bytes m FCOOh BOOT LOADER 1K bytes FFFFh DATA MEMORY The on chip data memory of AT89C51ED2 RD2 is as shown in the following diagram FFh Upper 128 bytes of Internal DATA RAM 80h 7Fh 1792 Bytes Lower 128 Of bytes of XRAM Internal DATA DATA RAM RAM 00h 000h 2K Bytes Of EEPROM DATA MEMORY Available only in AT89C51ED2 ESA MCB 51 User Manual 7FFh 700h 12 The on chip data memory includes 256 bytes of RAM as internal data memory 1792 bytes of RAM as external data memory and 2K bytes of EEPROM as external data memory Of these ESA MCB 51 monitor uses 256 bytes of XRAM for monitor data So User has to make sure that the monitor data area should not be disturbed 3 3 PORTS All the 4 Ports of the microcontroller are available on different connectors for different interfacing options
13. CHAPTER 1 or a AEO Nei 1 CHAPTER 2 2 1 2 2 2 3 CHAPTER 3 3 1 3 1 1 3 1 2 3 7 3 7 1 3 7 2 3 7 3 CHAPTER 4 4 1 4 2 OAD UDE CONTENTS INTRODUCTION TO ESA MCB 51 ESA MCB 51 Capabilities Specifications General Description Block Diagram CONFIGURATION AND INSTALLATION Configuration Installation Integration with Keil ESA MCB 51 HARWARE DESIGN DETAILS CPU CPU Reset CPU Clock CPU Bus On Chip Memory Map Code or Program Memory Data Memory Ports Serial Interface LCD Interface Description of the LCD Module LCD Pin Description and Interface to MCU Initialization of LCD Module LCD Instruction Set Interrupts Connector details Connector Descriptions Connection Details and Signal Definitions RS 232C Connection Details ESA MCB 51 MONITOR ROUTINES AND LCD LIBRARY FUNCTIONS MONITOR ROUTINES LCD LIBRARY FUNCTIONS ESA MCB 51 User Manual Page Nos 1 2 3 3 O 0 01 22 24 1 INTRODUCTION ESA MCB 51 is a development board and supports a wide variety of 8051 with on chip ROM compatible 8 bit micro controllers The 8051 family of micro controllers are extensively used for embedded and real time applications ESA MCB 51 is designed to be a general purpose development board for Single Chip MCU applications that may be used as an instructional learning aid and also as a development tool in R amp D labs in industries ESA MCB 51 development board is built around Atmel AT89C51ED2 RD2 micro c
14. ct 5V 1A power supply to the board 2 Connect the serial cable 9 Pin Female connector to PC and RJ11 connector to ESA MCB 51 3 Switch ON the power to board the following Sign On message should be displayed on the LCD ESA MCB 51 VX YY here x indicates version Y indicates revision If no message is displayed on the LCD then check the power supply connections and the switch SW1 as described in the earlier section If the problem still persists please contact the manufacturer After the Power up the board can be connected to Keil IDE to download and execute the user programs The Keil Monitor 51 Driver is used to download the OAD ESA MCB 51 User Manual 5 UDE user application code into on chip flash and also to debug the downloaded user application code 2 3 INTEGRATION WITH KEIL The following steps describe the user how to create and compile u Vision2 project for ESA MCB 51 board User can find more information on Keil project creation and compilation in the u Vision2 and C51 Getting Stated User s Guide Or Start the u Vision2 or u Vision3 IDE create a project file with Project New Project and select the CPU from the device database Select AT89C51ED2 or AT89C51RD2 as per the board 2 Create and save a source file and add this source file to the project This can be done in the dialog Project Target Groups Files or with a right click on the Source Group in the Project Window and the Add Files to Group option
15. elow Target Setup ES OAD ESA MCB 51 User Manual 8 Wo 7 Under the COM Port settings select the COM Port to which the board is connected and select the baud rate as 19200 or 9600 recommended Enable Serial Interrupt option if the user application is not using on chip UART to stop program execution 8 Build the project u Vision translates all the user application and links 9 After the Build press Reset on ESA MCB 51 10 Q Now user can enter into Debug mode with Debug Stat Stop Debug session dialog 11 The debugger connects to ESA MCB 51 and downloads the user application program into flash memory and also the debugger enables all the debugging features like Run Step Step Over etc KZ lcda p ision3 E ESA MCB 51 icdasm icd_asm EJ Eile Edit View Project Debug Flash Peripherals Tools SWVCS Window Help a g y Q Start Stop Debug Session Chi F5 JAM est SQ RS P3 7 RU P3 6 E P3 5 Register selec Read 1 or Wr LCD Enable Oh 30h 30h P3 1fh P2 00h status init dptr 0100h a a atdptr dat dptr r7 dpl r7 10h disp dam 8 O M PP E Run F5 Project Workspace P Step F11 Register Value O Step Over Fig El Re P gs 0 0x00 43 Run to Cursor line Ctl F10 ri 0x00 x 2 0x00 EA mM Breakpoints Chl B ist Dec fl Insert Remove Breakpoint F3 16 om E we 010 am Disable All Breakpoints El Sys dy Ki
16. ll All Breakpoints Chl Shift F9 a 0x00 amp gt Show Next Statement b 0x00 dptr Ox0000 PC C 0x000 lt E psw 0x00 pe Execution Profiling Inline Assembly Function Editor Open Ini File El Ue ru Ste Neen OAD UDE ESA MCB 51 User Manual 12 In Case of any Communication problems a dialog box opens that displays further options and instructions as shown below CONNECTION TO TARGET SYSTEM LOST Try Again Please reset your target system and select Try Again to resyncronize Settings Opens a dialog where you can select the monitor configuration serial interface parameters and more Stop Debugging Stop debugging session 13 Here check for correct COM Port settings and ensure the COM Port working condition Check the monitor configuration whether Keil Monitor 51 Driver is selected or not Press Reset on ESA MCB 51 and Try again If the problem still persists please contact the manufacturer 14 To stop the execution of user application programs use Stop option in Debug dialog If the user enabled the Serial Interrupt in Target Debug settings then the program execution stops normally otherwise it displays a sub window as shown below Can t stop application because serial interrupt is disabled Return to running application Stop Debugging Stops debugging session Notes When you enable the serial interrupt in the monitor driver settings dialog you can stop y
17. ontroller that has 64Kbytes of on chip program memory 1 1 ESA MCB 51 CAPABILITIES e The power full on chip flash monitor provides communication with Keil yu Vision Debugger e Executes the User Programs at full speed or Debug the Program using Single Step and Break Point facilities available in Keil u Vision Debugger e Examine Modify the contents of CPU registers and memory contents e On Board LCD 16x2 interfaced to port lines e All the 32 I O Port lines are terminated on 4 different 10 pin connectors e 24 port lines i e PO P1 and P2 are terminated on a 26 pin connector e All the CPU Signals are terminated on a 40 pin connector for system expansion e On Board ISP support for On Chip flash programming The ESA MCB 51 kit includes the following items e ESA MCB 51 Board ESA MCB 51 User Manual this manual RS 232 C Cable A CD ROM containing Keil Evaluation version Il Sample Programs for ESA Interface Modules Ill ESA MCB 51 Monitor Hex file IV Atmel s FLIP flash programming utility V AT89C51ED2 RD2 Data Sheet 8051 Instruction set reference Card OAD ESA MCB 51 User Manual 1 UDE 1 2 SPECIFICATIONS PROCESSOR e AT 89C51ED2 RD2 operating at 11 0592 MHz PROCESSOR FEATURES ON CHIP MEMORY CODE MEMORY 64K Bytes of flash DATA MEMORY 256 Bytes of RAM 1792 Bytes of XRAM 2K Bytes of EEPROM ON CHIP PERIPHERALS e 3 16 bit Timers Counters e Watch Dog Timer e Programmable Counter Array PCA on Port1
18. our application by using the STOP button The serial interface must not be used by your appliaction in this case 15 Here user can use the Stop Debugging button to stop the application program execution OAD ESA MCB 51 User Manual 10 UDE 3 ESA MCB 51 HARWARE DESIGN DETAILS This chapter describes the following hardware design details of ESA MCB 51 gt CPU On Chip Memory Map Poris Serial Interface LCD Interface Interrupts VV VV V WV Connector Details Note Please refer AT89C51ED2 RD2 Data Sheet for more details about the features of microcontroller 3 1 CPU ESA MCB 51 can be operated with AT89C51ED2 or AT89C51RD2 micro controller The board will be shipped with either of the above mentioned CPU 3 1 1 3 1 2 CPU RESET The board comprises of power on reset circuit the switch named as RESET switch can be used to reset the microcontroller CPU CLOCK An 11 0592 Mhz crystal is connected between the oscillator pins of the microcontroller The CPU uses this as clock source CPU BUS All the CPU signals are terminated on a 40 Pin connector site J8 User can make use of this connector for system expansion 3 2 ON CHIP MEMORY MAP OAD QO 3 2 1 CODE or PROGRAM MEMORY The AT89C51ED2 RD2 provides on chip flash program memory of 64Kbytes ranges from 0000h to FFFFh The EA signal of the MCU is hard wired to Vcc so that the Processor fetches the code from on chip memory The ESA M
19. r Description Writes a command to Instruction Register Argument Command Data 3 unsigned char LcdCmdRead Description Reads LCD s Instruction Register Return Value Instruction Register content 4 void LcdDataWrite unsigned char Description Writes a Value into Display RAM Argument Character value 5 void ClrLcd Description Clears the LCD 6 void WriteChar unsigned char Description Output a character in current Cursor Argument Character value OAD ESA MCB 51 User Manual 24 UDE 7 void WriteString char Description Output character string in current Cursor Argument Character string s Pointer 8 void BusyWait Description Wait amp Check LCD to be ready 9 void LcdDelay unsigned int 10 void HomeCursor void Description Brings Cursor to home 11 void SetCursorType unsigned char type Description Decide Cursor type Argument type Cursor type INPUT type 0 No Cursor type 1 Normal Cursor type 2 No Cursor Blink type 3 Normal Cursor amp Blink 12 void ShiftCursor unsigned char dir unsigned char num Description Shift to Left and Right current Cursor Argument dir Decide direction to be Shift INPUT dir 0 gt Right Shift dir 0 gt Left Shift 13 void GotoXY unsigned char x unsigned char y Description Move Cursor to X Column Y Row Argument X Column to move INPUT y Row to move INPUT Note LCD used on ESA MCB 51 is 2x1
20. to user The on chip UART is used to interface the board with PC OAD ESA MCB 51 User Manual 3 UDE The trainer uses the on chip flash monitor to communicate with Keil uVision Debugger The Flash monitor allows the user to program and debug the on chip code The monitor uses the on chip UART to communicate with uVision Debugger Typical layout of the flash monitor and Keil debugger is as follows PC with Keil uVision Debugger Monitor Driver User Monitor DATA Code Monitor Data User DATA CODE Flash ROM XDATA RAM User Code ven AT89C51ED2 RD2 OAD UDE ESA MCB 51 User Manual 2 CONFIGURATION AND INSTALLATION This chapter describes about configuration and the installation procedures of ESA MCB 51 The ESA MCB 51 board requires 5V power and a serial connection to a PC running Keil uVision debugger Hardware Requirements e The ESA MCB 51 Board e A serial cable given by the manufacturer i e RJ11 to 9 Pin female cable e APC 450Mhz and above with an available RS 232 Port 128 MB RAM and 30MB Hard Disk Space Software Requirements e Microsoft Windows 98 ME NT XP 2000 e The Keil u Vision IDE and Debugger The flash monitor is already programmed in the on chip flash of AT89C51ED2 RD2 2 1 CONFIGURATION The Board will be shipped with ready configuration to connect with Keil IDE Make sure that the switch SW1 is kept in the Exec Mode before connecting 2 2 INSTALLATION 1 Conne
21. usy Flag of the LCD module will be set while LCD is resetting and also when data or command has been written At this time user cannot write on to the LCD module Data can be written on to the module only when busy flag goes low 3 5 3 Initialization of LCD Module LCD module has to be initialized before writing any program on to it Initializing includes choosing character font initializing cursor for blinking and auto increment etc User has to choose the appropriate instruction code from the instruction set and send it over the module The control signals viz RS R W and E signals has to be selected using the corresponding Port bits i e P3 7 P3 6 P3 5 respectively The data has to be sent over data bus i e P2 OAD ESA MCB 51 User Manual 15 UDE The instruction set given below will be used to initialize the LCD module as required by the application programs 3 5 4 LCD Instruction Set CODE INSTRUCTION RS RW DB7 DB6 DB5 DB4 DB3 DB2 DB1 DBO Clear display 0 0 0 0 0 0 0 0 0 1 Return home 0 0 0 0 0 0 0 0 1 X Cursor to 00 entry mode set 0 0 0 0 0 0 0 1 1 D S display on off 0 0 0 0 0 0 1 D C B control cursor on 0 0 0 0 0 1 S C RL X X display shift function set 0 0 0 0 1 DL N F xX X read busy flag O 1 BF AC address X don t care S 1 display shift when data is written 1 D 1 increment cursor for normal operation set to 0 1 D 0 decrement cursor DL 1 8 bits data length S C 1 display shift DL 0 4 bits
Download Pdf Manuals
Related Search
Related Contents
NX-900/ NX-901 Model No. KX-TG1811AL KX-TG1812AL KX-TG1813AL EURO SIZER – ES4 - TEA elettronica Hampton Bay CHO1691S� Instructions / Assembly Samsung ES30 Bruksanvisning encoders-assoluti Owner`s Manual Manuel de l`utilisateur Manual del usuario RFQ - DHA Suffa University User`s manual - VTech Communications M-S1812125 - 1812 instructions R2 Copyright © All rights reserved.
Failed to retrieve file