Home

begv643a user manual

image

Contents

1. E f x 1 nnn III IIIIIZIIII HH HH 2 e 7 I mmm x 5 LCD controller CN2 RS232 fe 1 Microprocessor RS 485 422 81 EEPROM 6 User Manual 02 6 CW ww 5 r NEN 1 3 Block Diagram Drawing 1 3 AVR 8 bit Microprocessor 64KB ISP Flash 5232 20 x 240 STN 2KB Internal EEPROM 320 x 240 S lt 4KB Internal SRAM ISOLATED Touch Panel RS 485 ISOLATED RS 422 C 64KB x3 EEPROM Optional 1 4 Mechanical Dimension Drawing 1 4 160 0 0 3 152 LED WHITE B L 16 5 MAX DOT SIZE y lt SCALE 10 1 oo z 2 Hirose DF11C 32DP 2V e gt Te AN SPS HD BEGV643A User Manual Ver 02 M ar _ 1 5 Board Specifications Table 1 5 MCU High performance Low power AVR 8 bit microprocessor ATMEL ATmega644P Memory 64K Bytes In System Self Programmable Flash 2K Bytes Internal EEPROM 4K Bytes Internal SRAM 3 x 64K Bytes External EEPROM optional Display Support 8 bit single scan resolution 320 x 240 monochrome STN LCD with edge LED white backlight only Touch Panel optional Support four wired resi
2. VDD O45V VDD GND GND E GND Tem BEGV643A MISO MISO SCK SCK SS SS Slave Mester VDD VDD GND GND ES GND To BEGV643A MISO MISO SCK SCK SS SS Mester Slave 2 2 2 5 BEGV643A offers port Via this I C port designer may control 64Kbytes EEPROM in system and external IC devices VDD GND BEGVG43A b EEPSCL Mcroprocessor EEPSDA EEPWP d EEPROM 6 User Manual 02 elTe J BOLYMIN 2 2 2 6 5 422 BEGV643A offers 1 x RS 422 isolated port T5VO GND RS 422 isolated power RS 422 Transmitter 5 422 Transmitter X XX RS 422 Recever RS 422 Recever X XX RS 422 isolated ground 2 2 2 7 5 485 BEGV643A offers 1 x RS 485 isolated port S VO GND 5 485 isolated power RS 485 Transmitter Recever RS 485 Transmitter Recever RS 485 isolated ground BEGV643A User Manual Ver 02 18 _ w Chapter 3 MCU port mapping Abstract This chapter explains ATmega644p MCU pin configuration and port mapping toward key elements such as LCD Touch Panel RS 232 RS 422 RS 485 LED Backlight EEPROMI I C 2 serial port and General BEGV643A U
3. _ Add Link Object N i2ceeprom o S ERAT BE240128 Project Options Library Search Path Available Link Objects Link with These Objects Add Library gt Remove Object Move down RH 6 User Manual 02 68 r _ BE240128 Project Options Custom Compilation Options fshort enums External Tools Use Wind VR avr grc CAWing VR 2009031 3binayr gee exe a make C NWinA R 2009031 Sutilabintmake exe BE240128 Project Options Custom Compilation Options All files Triadn c d ges Options External Tools Use Wind YR avr grc CAWing R 2009031 3binlavr gec exe xt make Cin A VR 2009031 3 wtilsibin make D Note choose Linker Options BEGV643A User Manual Ver 02 69 r s w BE240128 Project Options Custom Compilation Options Use Wind 200 CAWinAYR 2009021 2 bintawy gec exe E C MWinA Y R 20090313tilsibinimake exe Note key in Wl u vfprintf and then Add BE240128 Project Options Custom Compilation Options W l u vfprmntt Linker Options External Tools Us Wind R avi CAWinAYR 2009031 3Ybimayr 200 exe Z CAWind R 2009031 3hutilstbinmake exe 6 User Manu
4. demotest c view Toole Debug Window Help File Build Edit Un Ga dh e Ab bir er dv ab O ME o eum BEEN go EX Save Project A 641 641 demotest c Close Project Recent Paoects Note Under AVR Studio4 Project Configuration Options BL127864G AWYR Project Optons Include File Search Path Milind VR wyntinclude L e Choose Include Directories Include File Search Path to continue Note Adding into Header files BEGV643A User Manual Ver 02 63 M ww E 82281371398 22 4 ff AmEBackupDeviveInfo J D AUD AMDOMY 105 AVL 2500 Y01 emn amp emp m AVR 05 awd 789 E E awdbedit 1 0_bin fy BE240128 BE240128 demotest EM S Hb ver Et lib E default 9 240128 test 196 Choose Include as File Search Path to continue HL12864G_AYE Project Optons Include File Search Path A S Am AWR eraneclude AAA ABOL libuncIudes 6 User Manual Ver 02 64 A __ BE240128 Project Options Library Search Path Available Link Objects Link with These Objects Add Library gt Remove Obiect Add Object Move up Move down ma Note For touch panel calibration Floating point operations is necessary so please
5. r0 PESE Dg o 5 D8 DEMO TEST ver 3 00 2 24c512 2nd URRT Test Master SPI Slave Touch Calibration 5 point LCD Test Brightness Turn 64 power designer will see this screen 00004 115200 8 N 00000000 NUM After seeing above screen designer can operate on PC amp BEGV643A A Enter number 1 for EEPROM function test 17 2 33 EEPROM B Enter number 2 for 2 UART function test C Enter number 3 for ATmega644P internal EEPROM function test D Enter number 4 for 4 wire Master function test E Enter number 5 for 4 wire SPI Slave function test F Enter number 6 to touch panel function test G Enter number 7 for touch panel calibration 5 point H Enter number 8 for LCD function test l Enter number 9 for backlight brightness adjustment function test BEGV643A User Manual Ver 02 51 2 BOLYMIN A Enter number 1 for 2 EEPROM function test 17 2 3 EEPROM ETT e BRO KAO HAO FUO BEC HAWD Dg 53 28 2 24c512 1 Address A2 2 Address 3 Address 6 0 ERIT 3848 00 01 13 SEWAR 115200844 CAPS NUM 1 Enter number 17 for 2 EEPROM function test 1 EEPROM 2 Enter number 2 for C EEPROM function test 2 EEPROM 3 Enter number 3 for
6. us BE Hi Puma mm mm a sca oms 654 E CN A O IC10 OI IIZIIIIIIIIAII IAIA 1 O FR 6 User Manual 02 12 jm mj ma OB silii ar ww nput Output Bi nput Output Bi Directional U User defined P Power Pin Definition BEGV643A Dual RS232 Table 2 2 1a Pin No Pin No EEPSDA 2 4 IOB 10 12 14 16 18 19 RX0 20 NC 23 RX1 24 NC 27 SDA 28 NC 29 SCL 30 NC Pin Definition BEGV643A1 One RS232 Table 2 2 1b 1 EEPSDA 5 NC 6 EEPWP 7 NC 8 OB 9 Rest 40 21 TXO 22 NC 25 NC 26 NC 29 SCL 30 N 1 C 6 User Manual Ver 02 13 f Pin Definition BEGV643A2 One RS232 One RS422 Table 2 2 1c 5 NC 6 OB e Pin Definition BEGV643A3 One RS232 One RS485 Table 2 2 1d 1 GND 2 EEPSD 3 VD 4 EEPSCL 5 NC 6 7 NC 8 J HO GND P 1 Logic power supply ground 3 VDD P Logic power supply 5V VDD2 P 20 External Power for isolated RS 422 485 5V VDD2 P 22 External Power for isolated RS 422 485 5V GND2 P 24 External Ground for isolated RS 422 485 ground2 GND2
7. 44 5 3 2 8 General I O Table 3 2i IOA 6 User Manual 02 TE n r 5 w Chapter 4 Software Development Tool amp Utility Abstract This chapter explains ATmega644p MCU software development tool AVR ISP mkll writer and Bolymin free software utilities 6 User Manual Ver 02 TEE n 5 w 4 1 ATMEL ATmega644p Software Development Tool Designers may download software development tool from AVR Studio website http www atmel com dyn products tools card asp tool idz2725 or from BOLYMIN utility disk 4 1 1 Download software from AVR Studio website step1 Download design software AVR Studio 4 16 build 628 126 MB updated 2 03 1 38 includes device support and numerous overall enhancements AVR t QTouch Studm sport for multipla Es ite tile combinations Windows Error uppat for MEGA device family First Hame Last Name Title Job Function Select Company Address 1 Address 2 City State Province US and Canada only Select Province only if outside US and Canada Postal Code Country Se lect Telephone E mail Address Fax What is the annual unit quantity usage Fill in necessary information and What is the estimated timeframe for need
8. P PREY NEXT 1 55 2 AA 3 00 FF 000405 115200 8 N 1 SCROLL CAPS NUM Address 0x0000 0x001D is for touch panel calibration data 1 Enter number 1 to write 55 on current screen 2 Enter number 2 to write AA on current screen 3 Enter number 3 to write 00 on current screen 4 Enter number 4 to write FF on current screen 5 Enter P to switch to previous page 6 Enter N to switch to next page 7 Enter number 0 to return to main screen 6 User Manual Ver 02 54 Enter number 4 for 4 wire Master function test 240128 BRS aE Sele Dg 8 DB PI MASTER Send 55 Send AA Send 5555 Send AAAA EXIT_ Il l M C gt r c 548002124 115200851 8 333 CAPS NUM 1 Enter number 1 to send 1 byte 0x55 2 Enter number 2 to send 1 byte OxAA 3 Enter number 3 to send 1 word 0x5555 4 Enter number 4 to send 1 byte OXAAAA 5 Enter number 0 to return to main screen 6 User Manual Ver 02 259 5 NENN E Enter number 5 for 4 wire SPI Slave function test 240128 PREH BEES Dg o3 span SPI SLAVE 1 Receive bvte 2 Receive word 0 EXIT MBAR 00 26 55 11520018 1 LL CAPS NUM 1 Enter number 1 to r
9. EEPROM function test 39 EEPROM 4 Enter number 0 to return to main screen HAW FUO WED HAW Dag o3 D8 r r r FF h AMT 0513 0 EMIT P PREV NEXT 1 55 2 88 3 00 4 FF SHAR 00 01 41 BAB 1152008 N 1 KOLL CAPS NUM 1 Enter number 1 to write 55 on current screen 2 Enter number 2 to write AA on current screen 3 Enter number 3 to write 00 on current screen 4 Enter number 4 to write FF on current screen 5 Enter P to switch to previous page 6 Enter to switch to next page 7 Enter number 70 to return to the previous page nn M n nnum 6 User Manual Ver 02 52 M S B Enter number 2 for 2 UART function test test BREH CEO SEO WAC FC BED HAD Da 523 2nd URRT Test 1 Send 55 HH 9999 AAAA 3 00 03 23 115200 8 N 1 NM 1 Enter number 1 to send 1 byte 0x55 2 Enter number 2 to send 1 byte OxAA 3 Enter number 3 to send 1 word 0x5555 4 Enter number 4 to send 1 byte OxAAAA 5 Enter number 0 to return to main screen Auto receive byte or word BEGV643A User Manual Ver 02 39 M r C Enter number 73 for ATmega644P internal EEPROM setting test BRE rab RE RHO RAO FUO MED HAH
10. t x start uint8 t y start uint8 t x end t y end uint8 t pic data uint8 t mode Parameters x start X coordinate of the top left point of input picture UNIT pixel y start Y coordinate of the top left point of input picture UNIT pixel x end X coordinate of the bottom right point of input picture UNIT pixel y end Y coordinate of the bottom right point of input picture UNIT pixel pic data Bit map data will be drawn Input O will reverse pixels of specified area mode DRAW NORMAL Draw the picture normally DRAW REVERSE Reverse the picture and then draw the picture Return value None 6 User Manual Ver 02 81 wwCs a c IcdFillByte Function Fill input byte value on specified area of graphic layer Syntax void IcdFillByte t t t t t t Parameters x start X coordinate of the top left point of specified area UNIT pixel y start Y coordinate of the top left point of specified area UNIT pixel x end X coordinate of the bottom right point of specified area UNIT pixel y_end Y coordinate of the bottom right point of specified area UNIT pixel pic data Byte value will be filled Mode DRAW NORMAL Fill input value normally DRAW REVERSE Reverse the input value and then fill it on the specified area Return value None IcdPrintString Function Print input string to speci
11. 9 Frame ground Connect metal frame with GND L open Not connected metal frame with ground default 2 1 3 RS 422 RS 485 VDD Ground Drawing 2 1 3 ae di s C7 1C4 57 IIIIIIIIIIIII II IIIIIIIIIIIIIW IIIIIIIAIIIIIIIIII I IIIZIIIuYAII ZIIZIIII III IIIIIIIUIIII OIIII IIIIIIIIIIII IIIIIIIIIIIIIAIIII III II I LIIIIIIIGI IIIZ IIIIIAIIIIIII OIZIII IIWIYIIIIIII EIIZ IIDIIIIIIIIIIIII IIIIIIIIIIIIIIIW IIIIIIITIIIIIIII IIIIIIIIIIIII III IIIIII IICIIIII IIIIIIII IIIIIIIA 4 IIIQIIIIII IZITI I II IC8 IIIIIIIIIIIIIIIII IIIIIIIIIII CN 2 3e NE II ue us Hil 8 ald IC10 g 2 8 sss m m internal VDD ground for isolated RS 422 485 open open External VDD ground for isolated RS 422 485 default BEGV643A User Manual Ver 02 11 T S w 2 1 4 Screw hole ground Drawing 2 1 4 O D BEGV643A V 0 II IIGIZO IIHII uII IIIIII 5 5 5 E m WN 5 MU T 2 ICB IW _ mo E
12. P 26 External Ground for isolated RS 422 485 ground2 r rss rr smrI s T 6 User Manual Ver 02 14 2 2 1 2 Serial Table 2 2 1 2 ES U f O MOSI is the mater data output line when on module is MOSI 13 configured as a master When is configured as a slave This pin reverse the role MISO 15 MISO is the master data input line when SPI is configured master When SPI Is configured as a slave This pin reverse the role SPIdock 0 RXO 19 Receiver of first RS232 with driver TXO 1 O 21 Transmitter of first RS232 with driver Z 1 23 Receiver of second RS232 with diver gt Z T 1 O 25 Transmiterofsecond RS232 with driver DA Dal of 2 wire serial interface it can be programmed as 10 SCL Clock of 2 wire serial interface it can be programmed as lo Bl 2 Dare of 2 wre interface for additonal update EEPSCL Clock of serial interface for additional EEPROM update 1 6 wie protect of additonal EEPROM 422 12 inverting receiver 5422 422RN inverting receiver RS422 A221P A85P When it configured as RS422 it act as no inverting transmitter When is configured as RS 485 it acts as positive differential IO When it configured as
13. bklight pwm h object file bklight pwm o Note Backlight PWM control used TIMERO and INTERRUPTO bkIPWM Init Function Initialize all parameters of backlight PWM control function User should call this function before use backlight PWM control functions Syntax void bkIPWM Init Parameters None Return value None bklSetBrightness Function Set current brightness value of backlight Syntax void bklSetBrightness uint8 t brightness Parameters Brightness New brightness value OFF backlight 1 100 Control the brightness of backlight Return value None bklGetBrightness Function Get current brightness value of backlight uint8 t bkIGetBrightness Current brightness value of backlight 0 100 6 User Manual Ver 02 84 _ r Appendix LCD Controller Specification Appendix B EEPROM Specification Appendix C ATMEL ATmega644p MCU Specification Please download this specification from following ATMEL link http www atmel com dyn resources prod documents doc80 11 pdf 6 User Manual Ver 02 85 Borin eee S lt END of BEGV643A User Manual gt BEGV643A User Manual Ver 02 86
14. h const char szCross 8 0x10 0x10 0x10 Oxfe 0x10 0x10 0x10 0x00 i2oeeprom h Const char szCrossLeft B 0 01 0 01 0 01 OxOf x0l 6x01 0 01 00 FN spih const char szCrossRight 8 0x00 0x00 0 00 0 0 00 0x00 0x00 0 00 a 18 stlINC h const char szCircle 8 0x18 0x24 0x42 0x81 0x81 0x42 0x24 0x18 one he 16963 h 6953 void locate uint t x uint t y ay void draw char uintB t x uint8_t y char szPattern 3 22 USARTI Other Files H WATCHDOG ff 246512006 001 address 2 24C512 U4 011 address A6 Name ddress Value Bits JD ADC na 0x78 aj P ADCSRA 0x74 00000000 3 ADCSRB eS 3 1 ADMUX 0 7 00000000 J1DDIDRO 0 7 000000 int test ulnt _t uRxData uintl t u dcl u dc2 uAdc3 uAdc4 t szString 64 Const ulnt8 t szWelcome Welcome to Bolyminl r n DAAVRXBE240128_demotestNMain c Program 42568 bytes 65 0 Full text data bootloader Data 203 bytes 5 05 Full data bss noinit 3 Build succeeded with 0 Warnings 2 El Buld Message 54 Find in Files Breakpoints and Tiscepoints ATmega 44P AYR Simulator Auto Ln 18 Col 24 CAP NUM OVR BEGV643A User Manual Ver 02 2A 2 BOLYMIN i 9 view window CONVERTER si ANAL
15. uartSendString Function to send 1 string from assigned UART port Syntax void uartSendString t byPort uint8 t str Parameters byPort 1st port UART PORT1 2nd Uart port str Index of string to be sent ending with 0 Return value None uartSendBuffer Function to send buffer from assigned UART port Syntax void uartSendBuffer t byPort uint8 t buffer uinti6 t nBytes Parameters UART PORTO 1st Uart port UART PORT 2nd Uart port index of buffer to be sent bytes of buffer to be sent Return value None uartReceiveByte Function to read 1 byte data from assigned UART port Syntax uint8 t uartReceiveByte t byPort uint8 rxData 5 UART 1st Uart port UART PORT1 2nd Uart port rxData index of data to be received Return value TRUE rxData is true data FALSE UART port no data uartReceiveBufferlsEmpty Function to check if there is data in assigned UART port Syntax void uartReceiveBufferlsEmpty byPort UART PORTO 1st Uart port UART PORT 2nd Uart port Return value TRUE There is data on assigned UART port FALSE There is no data on assigned UART port 6 User Manual Ver 02 272 y BOLYMIN rs s w uartFlushReceiveBuffer Function to clear receiving buffer on assigned UART port Syntax void uartFlushReceiveBuffer uint8 t byPort Parameters byPor
16. Browse and select another Folder Click Mexk to continue Destination Folder Space required 122 6MB Space available 51 726 Lee Choose folder to continue BEGV643A User Manual Ver 02 33 _ n s w WinAYR 20090313 Setup Choose Components Choose which Features WinAVR 20090313 vou want to install Check Ehe components you want to install and uncheck the components you don t want to install Click Install Ea start the installation Select components to install Install Files Add Directories to PATH Recommended Install Programmers Notepad Space required 122 6MB Choose components to install Wink 20090313 Setup m Installing Please wait while WinAVR 20090313 is being installed Extract lt Back Cancel Wait for seconds for installation BEGV643A User Manual Ver 02 34 _ WinAYR 20090313 Setup Completing the Winay R 20090313 Selup wizard wWinAVR 20090313 has been installed on your computer Click Finish Ea clase this wizard Click finish to exit installation AVR Studio and AVR gcc software are also available on Bolymin utility disk or Bolymin Website 6 User Manual Ver 02 35 _ s w 4 2 Execute AVR Studio 4 16 on designer PC Start All programs Atmel AVR Tools AVR Studio 4 J AeA Lm YN fag Atmel AYE Tools k AWR Studio 4 Win VR 20
17. Simulator ATmega644P click Finish to continue 6 User Manual Ver 02 UE AYR Studio DAAYRIBEG Y641 AXBEGV641A demotest c AVR GCC vx BEGV641A demotest default B DAAYRIBEGY641 AXBEGY641A demotest c Sy Source Files Sy Header Files um lo y External Dependencies 1D AD CONVERTER 3 Other Files TD ANALOG COMPAR 4E BOOT LOAD y cru EB EEPROM 4j EXTERNAL INTERR 935 JTAG aj S8 PORTA JES PORTB 4j ES PORTC 4j ES PORTD a TIMER COUNTER 0 TIMER 1 jS TIMER COUNTER 2 TWI 4j S2 USARTO 4j S USARTI 4 WATCHDOG UM DAAVRIBEGV641 A BEG 641A_demotest c E Buld SS Find in Files Q Baeskpcints and Tiscepoints Uem Awto nical NUM OVR Here you can see software design screen yet no hurry to start software design yet AYR Studio DA amp VEXBEGYGA I AABEGYDAI demotest c File Puxect Build Edt View Tools Debug Window Choose Project gt Configuration Options to continue BEGV643A User Manual Ver 02 38 _ n s w BEGY 6414 demotest Project Options Edit Confieuratin Use External Makefile qul 1 Target name must equal project name 2 Clean rebvald support requires clean target 3 Makefile and target must exist in the same folder Output File Name BEGY641A demotest elf Output File defau
18. Studia continously developing In order to get latest upgrades of AYA Studio please visit aur web site wnan atmel com and check aut the page w Accept terms to continue 6 User Manual Ver 02 26 2 BOLYMIN Fr w AVRStudio4 InstallShield Wizard Choose Destination Location Select folder where setup will install Files Install AWA Studio to C Program Tools Installshield s Select folder to install and continue BEGV643A User Manual Ver 02 27 BOLYMIN 2 S AYRStudio4 InstallShield Wizard E3 Select Features Select the features setup will install Select the features you want to install and deselect the features you do nat want to install Description USB driver For ILE 401 mkll JTAGICE and These can be installed later bu running the Setup program and select Modify Windows 95 and Windows MT da nat uppart LIS B Space Required 956558 K Space Available C 5434373715 K Installshield lt Eack i Next gt Cancel OK Cancel Select features to install and continue BEGV643A User Manual Ver 02 28 2 BOLYMIN n s w AYRStudio4 InstallShield Wizard ab www gt gt i a Heady
19. Studio D AA Y RAHE240128 demotesthBE24l 128 c File Project Build Edit View Tools Debug Window Help AVE in ca ICES0 Zelftest JTAGICE Upgrade AVE ONE Upgrade EE BL12864G AVE default DE source Files Header Files Extemal Dependencies 240128 d Other Files Eu 40128 demote iil a byte if ulnt _t aarthecelve Show Rey Plug in Manager ffl flush all data Choose Tools Program AVR Connect to continue select AYE Programmer Flatform Cancel Baud rate 15200 Baud rate changes are auta connect to the programmer used last time press the Programmer active immediately button an the toolbar Note that tool cannot be used For programming as lang as itis connected in a debugging session In that case select Stop Debugging First Choose AVRISP USB Connect to continue 6 User Manual Ver 02 45 _ n s w AYRISP mkII in ISP mode with Tmega644P Eli 3 Main Program Fuses LockBits Advanced HW Settings HW Info Awto W Erase device before flash programmme Verify device after programmi Flash f Input HEX File DABE240128BE240128 default BE240198 hex Program EEFROM D Input HEX DABE24012PABE240129 lefaulWBE24
20. m 4 m 2 32 ANN HI NE mmm P s i C O aff T Ore On O FR Connect screw hole with GND 2 2 Connectors Connectors are the key link between BEGV643A and external devices Detail locations and functions of available connectors are tabled and illustrated below Connectors Table 2 2 Label PinNo 2 2 1 Connectors amp Pin Definition Connector CN1 Drawing 2 2cn1 O gt BEGV643A V 0 1 7 6 5 1 4 57 IIKIIIIIIIII II z IIIINI IIIIIIG IIII OIIUIIII I III IIIIIIIII IIIIAII IIWIIIIIIIIIIIZII IIIIIIIIIIIIIII oo II II IIIIIIIIIIIIII OIzIII IIIIIIIIIII I IZIII IIIIKIIIIII IUIIRI IMWIIIIIIIIIIIIIII EIIUIIIIIIIIIII III IIII AIIZIIIIII mIIGII II IIIIIIIIII IIIIIIIIIIIIIIIII II4IIIIIIIIIMINI IIOIII II l IINI III A IIAI I IIIIIIIIAIWII IIIIIIIIIOII qIOII OIOIIIII IIMIIIII OIIIIIIUIIII IZI o Ho IC8 IIZIIIIIIAIIIIIIII m I IIIIIIIIII IW I 57 Ul E mum 4 u4 Ed cre IIIIIIIIIIXIIIXII IIIIIII IIIIIWI A p a IIII0I IIIIII 32 AHHH 1 1 Ei mEm K W w
21. read Y Coordinate from touch data data of pX and pY is true data of pX and pY is false uint8 t touchDrawCalPoint POINT ptCal int n Parameters Calibration Coordinate Calibration Coordinate No Return value None setCalibrationMatrix Function to set Calibration calculation matrix void setCalibrationMatrix POINT ptDisplay POINT ptTouch int n ptDisplay LCD reference Coordinate for calibration ptTouch Touch Coordinate for calibration n Coordinate No for calibration Touch X Coordinate y Touch Y Coordinate pX LCD X Coordinate changed from Touch X Coordinate p LCD Y Coordinate changed from Touch Y Coordinate None Parameters BEGV643A User Manual Ver 02 79 4 3 3 6 LCD control function Header file RA8806 h object file RA8806 0 Icdinit Function Initialize all parameters of LCD display User should call this function before use functions of LCD display Parameters None Return value None IcdDisplayClr Function Clear screen include graphic and text layer Parameters None Return value None IcdSetCursorPos Function Set the position of cursor UNIT character 8 8 pixel Syntax void IcdSetCursorPos t unta t y Parameters X X coordinate of cursor y Y coordinate of cursor Return value None IcdSwitchDisplay Function ON OFF the display of cursor text and graphic la
22. 0120 2ep Program ELF Production File F ormat Input ELF File ID BEZ2401283BE2401 28 defaulBEZ240128 elf d Fuses and lockbits settings must Program be specified before saving to Eogam ELF Getting revisions HW 0x01 FW Major 0501 FW Minor OE Choose Hex file for ATmega644p flash gt Program Choose Hex file for ATmega644p EEPROM Program Choose ELF file for fuses and lockbits gt Program 6 User Manual Ver 02 46 _ WW ww wa Start software burning AYRISP mkII in ISP mode with Tmega644P Main Program Fuses LockBits Advanced HW Settings HW Info Auto Erase Device Check signature Program FLASH Verify FLASH Read FLASH Program EEFROM Verify EEPROM Read EEFROM Write osc cal bote Program fuses Verify fuses Read fuses Log to file Program lock bits f Oyveryrite Verify lock bits Append Read lock bits Browse Enable fuse warnings Detecting on USB AVRISP mkl with serial number 000200002421 found rette isp parameter SO Ux06b DE Choose Auto and necessary configure and click Start to program BEGV643A User Manual Ver 02 A s s w AYRISP mkII in ISP mode with ATmega644P m E4 Main Program Fuses LockBits Advanced HW Settings HW Info Auto Erase Device Check signature Program FLASH Verify FLASH R
23. 090313 AWR Tools Help JE Plug in Manager AYR Battery Studio GT AVR QTouch Studio Ww AWR Wireless Studio Welcome A YE Studio 4 Modified Ver 416 628 Show dialog at start Click New Project to start T aject type Project name Atmel AVR Assembler AWR GCC Z Create mitate Create 19 Initial file asm Location D MAWR NBE 2401 29 demotesl 2 Show dialas Choose Atmel AVR Assembler assembly language or AVR GCC C code BEGV643A User Manual Ver 02 36 Create new project Project type Atmel AVA Assembler dematest Create initial file Initial file Create folder Location DO VAMAABE 401 2B _ demotest Ver 416 629 Show dialog at startup Cancel Help Choose AVR GCC here All Bolymin utility drivers are designed with C code and key in Project Name and Initial file Welcome to Studio 4 Select debug platform and device Debug platform Device AVR Dragon ATmega48P AVR ONE ATmega48PA AVR Simulator ATmegab4 SS AVR Simulator 2 gt E Eu it JT AG ICE JTAGICE ml ATmegab43 AT megab4Hr 4 Open platform options next time debug made iz entered Ver 416 626 lt lt Back gt gt Finish Cancel Help Choose AVR
24. 20090313 Setup Welcome the Win amp vH 20090313 Selup wizard This wizard will quide you through the installation of in AR 20030313 is recommended that you clase all other applications before starting Setup This will make it possible to update relevant system Files without having to reboot your computer Click bo continue Close other applications to continue BEGV643A User Manual Ver 02 32 WEOLYMIN w L WinAYR 20090313 Setup License Agreement Please review the license terms before installing WindVR 20090313 Press Page Down to see the rest of the agreement WinAVR Licensing Information GNU Binutils is distributed under the GNU GPL License GNU Compiler Collection acc is distributed under the GNU GPL License avr libc is distributed under BSD License lavrdude is distributed under the GNU GPL License GNU Debugger GDB is distributed under the GNU GPL License Insight is distributed under the GNU GPL License SimulAVR is distributed under the GPL License is distributed under the the GNU GPL License IF you accept the terms of the agreement click I Agree to continue You must accept the agreement to install WingVR 20090313 WinAYR 20090313 Setup Choose Install Location Choose the Folder in which bo install WinavR 20090313 Setup will install WindVR 20090313 in the Following Folder To install in different Folder click
25. BEGV643A USER MANUAL LCD Embedded System Atmel ATmega644p MCU Graphic 320x240 STN LCD LED white backlight RS232 RS422 RS485 SPI 64KB in system programmable Flash No Operating System required Join Bolymin Inc www bolymin com tw _ info bolymin com tw ar ww 5 Precaution P3 Packing Contents P4 Chapter 1 Introduction P5 1 1 Features P6 1 2 Board Layout P6 1 3 Block Diagram P7 1 4 Mechanical Dimension P7 1 5 Board Specifications P8 1 6 Ordering Information P8 Chapter 2 Installation P9 2 1 Jumpers P10 2 1 1 Contrast adjust P10 2 1 2 Frame ground P11 2 1 3 5 422 485 VDD ground 11 2 1 4 Screw hole ground P12 2 2 Connectors P12 2 2 1 Connector amp Pin Definition P12 2 2 2 Pin vs Function Diagram P16 Chapter 3 MCU Port Mapping P19 3 1 MCU Pin Configuration P20 3 2 MCU Port Mapping P21 3 2 1 LCD Controller P21 3 2 2 Touch Panel P21 3 2 3 RS 232 RS 422 RS 485 P21 3 2 4 Enable Backlight P21 3 2 5 EEPROM I C P21 3 2 6 2 wire serial port P21 3 2 7 P22 3 2 8 General P22 Chapter 4 Software Development Tool amp Utility P23 4 1 ATMEL ATmega644p Tool P24 4 1 1 Download software from AVR studio website 4 1 2 Additional tool for language P32 4 2 Execute AVR studio 4 16 on designer PC P36 4 3 In system programmer AVR ISP mk II P44 4 4 Bolymin Free Software Utilities P62 4 4 1 Website links P62 4 4 2 Introduction of BOLYMIN software utilities 4 4 3 Software util
26. E CO F d gd tot 000602 1152008 N 1 CROLL CAPS NUM 1 On the LCD designer will see EH displays Please use light pen to touch center point of until it turns to be 1 Such one point is calibrated 2 Please repeat above process to calibrate 5 points 3 Touch panel calibration is finished BEGV643A User Manual Ver 02 58 Enter number 8 for LCD function test e test zm KED RAM FUO WE AU Dg o gt 5 DE Test Full ON V line Cross dot Show char Picture 1 Picture 2 Il I l l l l 1 CONNOR OME 00 09 16 GEHA 1152008 N 1 FOLL CAPS NUM 1 Enter number 1 to LCD show 2 Enter number 2 to LCD show vertical line 3 Enter number 3 to LCD show horizontal line 4 Enter number 4 to LCD show half 5 Enter number 5 to LCD show cross dot 6 Enter number 6 to LCD show character 7 Enter number 7 to LCD show picture 1 8 Enter number 8 to LCD show picture 2 9 Enter number 0 to return to main screen Full on V line 6 User Manual 02 59 57 mw Cross dot Character Picture 1 Picture2 BEGV643A User Manual Ver 02 60 5 NEN l Enter number 9 for backlight brightness adjustmen
27. OG COMPAR BOOT LOAD aB E EEPROM J Van EX TERNAL 4 25 159 PORTA 159 POR TE 159 PORTC 159 PORTD PEGI 0 129 TIMER COUNTEER 1 169 TIMER COTUNTEER 2 TWI J USARTU 3 S2 USARTI WATCHDOG Name Address 4 ape 0787 JW ADCSRA x74 III 1 ADCSRB Jl 2 ADMUX x 7C 000000 Jl DIDRDO 00000000 4 Message window Program 42568 bytes 65 0 Full P text data bootloader Data 203 bytes 5 05 Full data bss noinit Build succeeded with 0 Warnings E Buld Message 54 Find in Files Q Tracepoints 5 Toolbars E File Fioject Build Edit Wiew Tools Debug Window Help iil i II B d Es lil 6 User Manual 02 43 _ 4 3 In System Programmer AVR ISP mkll NA gael dl Inside mkll box 1 designer will get DVD 2 mkll device 3 and USB cable 4 Please be sure that all parts are packed inside USB Cable AVR ISP mkll MGI01 0 DC 5V BEGV643A User Manual Ver 02 2224s _ zs w Steps 1 Get mkll connected to PC AYR
28. RS422 it acts as inverting transmitter When xl is configured as RS 485 it acts as negative differential IO EN485 O 28 Enable RS 485 2 2 1 3 General I O Table 2 21 3 Reset 5 Auxiliary moment reset for external input A u s port ATmega644P portA 4 IOB I O port ATmega644P portA 7 6 User Manual 02 15 BOLYMIN MEHE NEN 2 2 2 Pin Function Diagram 2 2 2 1 Power LCD Backlight Diagram of system power supply and contrast adjustment HVO GND 2 2 2 2 In System Programming BEGV643A offers in system software burn in function which allows designer to write software into ATmega644p via ATMEL AVR ISP MKII writer without taking ATmega644p IC off board Please visit following website for more information on AVR ISP MKII writer http www atmel com dyn products tools card asp tool id 3808 5V 2 2 2 3 RS 232 BEGV643A offers RS 232 port to contact PC or other RS232 device directly without ICL232 45VO m dp d GND Tw O 4 RS232 Host Slave BEGV643A User Manual Ver 02 16 2 2 2 4 BEGV643A offers SPI port Designer has to define this port as SPI by software or to use Bolymin SPI driver free utility M r NEN
29. Return value None spiSetBitrate Function to set baud rate Syntax void spiSetBitrate uint8 t spr Parameters baud rate system OSC is 11 0592MHz 3 OSC 128 Return value None spiSetDataOrder Function to set order when sending data LSB first or MSB first Syntax void spiSetDataOrder uint8 t order 5 LSB first or MSB first DATA LSB FIRST LSB the data word will be transmitted first DATA MSB FIRST MSB of the data word will be transmitted first Default Return value None spiSendByte Function to send 1 byte data from SPI port Syntax void spiSendByte uint8 t data data byte to be sent spiRecvByte Function to receive 1 byte data from SPI port To read 1 byte data from SPI 6 User Manual Ver 02 76 y BOLYMIN cavnr 2 7 w spiTransferByte Function to send and read 1 byte data from SPI port Syntax uint8 t spiTransferByte uint8 t data data byte to be sent 1 byte data reading from SPI spiTransferWord Function to send and read 1 word from SPI port Syntax Uint16 t spiTransferByte uintG t data data word to be sent 1 word data reading from SPI 6 User Manual Ver 02 71 f 4 3 3 4 E PROM function E PROM Function is built inside WinAVR so users need only to include eeprom h in program to call E PROM Function For exmaple include lt avr eeprom h g
30. add libm a and libprintf flt a in WinAVR BE240128 Project Options Library Search Path Available Link Objects mk These Objects Remove Object Add Object Move up Move down am BH 6 User Manual 02 65 s w BE240126 Project Options Library Search Path Link with These Objects Add Library gt libin a emave Object Add Object Move up Move down ms BE240126 Project Options Library Search Path Available Link Objects tak with These Objects Add Object Move up Move down am BH BEGV643A User Manual Ver 02 66 BE240128 Project Options Library search Path Available Link Objects Link with These Objects Add Library lbprimtf flt a Remove Object Move up Move down Note Adding into Obj Add Link Object ga ACER ACERDATA D 2 BE240128 BE240128 e 4 DVD RAM lt EARTE F om s T 4 DVD i Documents d My DxDM Places J 06 Private Folder 58 1option Er ic 30304 AVL 2500 BEGX581 BIOSSEGEERGE TB SES SERE ic CABLE led 6 User Manual Ver 02 67 _
31. al 02 70 4 4 3 Software Utilities Function Description 4 4 3 1 UART function Header file uart h Object file uart o uartlnit Function Initial UART Syntax void uartlnit uint8 t byPort uint32 t uBaudrate uint8 t byParity t uDatabit uint8 t uStopbit uint8 t nTxMode Parameters byPort UART PORTO 1st Uart port UART PORT1 2nd Uart port nBaudrat Baud rate ex 9600 byParity Parity Check None E EVEN O ODD uDatabit data bit 5 8 uStopbit data bit 1 2 nTxMode Transmission Mode 0 FALSE RS232 1or TRUE 5485 or RS422 Return value None uartSetBaudRate Function to set up baud rate for assigned UART port Syntax void uartSetBaudRate t byPort uint32 t uBaudrate Parameters byPort UART PORTO 1st Uart port UART PORT1 2nd Uart port nBaudrate Baud Rate ex 9600 Return value None uartSendByte Function To send 1 byte from assigned UART port Syntax void uartSendByte t byPort uint8 t txData Parameters byPort UART PORTO 1st Uart port UART PORT1 2nd Uart port txData byte to be sent Return value None 6 User Manual Ver 02 7 2 BOLYMIN f uartDisablePort Function to stop operation of assigned Uart port Syntax void uartDisablePort uint8 t byPort Parameters byPort UART PORTO 1st Uart port UART PORT 2nd Uart port None
32. ate 0 100K 1 250K 6 User Manual Ver 02 74 _ M NEN 4 3 3 3 SPI function Header file spi h object file spi o spiMaster Function Initial SPI to master mode Syntax void spiMaster uint8 t mode Parameters mode 0 CPOL 0 CPHA 0 Sample Rising Setup Falling 1 CPOL 0 CPHA 1 Setup Rising Sample Falling 2 CPOL 1 CPHA 0 Sample Falling Setup Rising 3 CPOL 1 CPHA 1 Setup Falling Sample Rising Return value None SPI Transfer Format with CPHA 0 0 mode 0 SCK CPOL 1 mode 2 SAMPLE MOSI MISO MSB first DORD 0 MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB LSB first DORD 1 LSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 MSB SPI Transfer Format with CPHA 1 SCK CPOL 0 mode 1 SCK a m m mode 3 SAMPLE MOSI MISO MSB first DORD 0 MSB Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB LSB first DORD 1 LSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 MSB 6 User Manual Ver 02 75 W spiSlave Function Initial SPI to slave mode Syntax void spiSlave uint8 t mode Parameters SPI mode 0 CPOL 0 CPHA 0 Sample Rising Setup Falling 1 CPOL 0 CPHA 1 Setup Rising Sample Falling 2 CPOL 1 0 Sample Falling Setup Rising 3 CPOL 721 CPHA 1 Setup Falling Sample Rising
33. cation and function of each available jumper Label A Function LCD contrast control RG Frame ground RG X Frame ground 92 93 RS 422 RS 485 VDD ground Screw hole ground Detail location and function of each jumper is illustrated below 2 1 1 Contrast Adjust Drawing 2 1 1 O a BEGV643A VO a Ht _ Mmmm 5 5 HNNAN TTT m u T 9 Ice MMM m YNNI 5 B n dice VR mnn 2 A CO 1 15 E 0908 enor M Contrast adjust 10K ohm default jOusde 6 User Manual Ver 02 0 s w 2 1 2 Frame Ground Drawing 2 1 2 O 9 BEGV643A d Qmm nmm mmm IIII IIWIIIIII TTT 5 E TTT MH TTT E 9 Eu E UL E ds E TU e 3e pad _ _ HH HH HEATHA EE de m e E 5 us vi us 4 E de 5 U ER B Ov ERI L
34. ce a compact design with cost saving space saving and design phase saving Armed with RS232 RS422 485 IC and SPI interface port this BEGV643A communicates many devices and peripherals The BEGV643A is therefore suitable to sit as a industrial control panel for factory automation equipment electronics instrument HMI human machine interface office automation equipment medical equipment parking system ticketing system and so on There are five LCD colors among choices STN gray STN yellow green STN blue FSTN Positive and FSTN negative All comes with LED white backlight 64KB in system self programmable Flash offers sufficient ROM size for designer to develop software further to control LCD touch panel and interfaces Designer may simply design this BEGV643A into your application as you are designing a ATMEL CPU board without worrying LCD module and other interfaces since they are all on one board 1 2 Board Layout This layout shows the location of each important IC connector and jumper Please refer to chapter 2 for further information on jumper and connector Drawing 1 2 O p BEGV643A 7 C6 5 4 V II III IIIII III I IIIIGII IWITAIIIII IIIIRIIIIWIIIIIAI I IIIIIIIII IZIIII _ OIIII IIIIIIIIIO II III I I III IIIIII III 2 01 0 o U1
35. click to download Would you like to receive news about Atmel Click ta Download Step2 install AVR studio on designer PC Setup eXe cen Software Inc Double click to install AVR studio4 16 BEGV643A User Manual Ver 02 24 2 BOLYMIN w AYRStmdio4 InstallShield Wizard Welcome to the InstallShield Wizard for S The InstallShield Wizard ill install AVA Studied on your computer To continue click Nest install ied Nel 6 User Manual 02 23 MN 2 S AYRSEId104 InstallShield Wizard License Agreement Please read the following license agreement carefully Welcome ta Studio fram Atmel Corporation AVH Studia Development Tool for the entire AYA family of microcontrollers including tin vH mega A and MEGA AVA devices The AYA Studio is free of charge and be freely copied and distributed in its original form AWR Studio enables the user to fully control execution of programs on the In Lircuit Emulator on the included AWR Instruction Set Simulator Studia supports source level execution of Assembly and C C programs assembled with the Atmel Corporation s included AWR Assembler or tools from 3rd party vendors Studio runs under Microsoft Windows 88 windows MT Microsoft Windows 2000 Windows and windows Vista AWA
36. ead FLASH Program EEFROM Verity Read EEPROM Write osc cal byte Program fuses Verify fuses Read fuses Log to file Program lock bits f Overyrite Verify lock bits C Append Read lock bits Browse Enable fuse waminps FLASH contents is equal to file DE Writing fuses address 0 to 2 0209 OE Reading fuses address Ul to 2 UxD9 OE Fuse bits verification DE Leaving programme mode OE Good job Software burning is done 6 User Manual Ver 02 48 _ or NEN Product Function Verify RS 232 MGIO1 0 DC 5V On PC Start gt All programs Telecommunication Hyper Terminal Please define a name and choose a icon for this connection and click Yes to continue SP ESSE TERES rm EFO a 886 000000 ND Choose suitable port click Yes to continue 6 User Manual Ver 02 49 TL f n sre E te E eG B lt s pit E Tel ED L R on a di imi z Key COM port setting 115200 8 No 1 No and click Yes to continue 6 User Manual Ver 02 50 W
37. eceive 1 byte 2 Enter number 2 to receive 1 word 3 Enter number 0 to return to main screen 6 User Manual Ver 02 56 2 BOLYMIN ww F Enter number 6 to read from touch panel 240128 TY m BH WWA Dg cA 4 661 V 653 DN 199 DY 85 N 299 Y b amp DH 136 DV 63 K 047 V 580 DK 137 DV 65 4 999 V 458 DK 102 DV 67 61 V 455 DH 101 DV 67 A 5961 Y 404 DR 101 0 6 4 696 V 407 DK 87 DV 91 8 949 Y 737 DK 184 DV 29 4 941 V 740 DK 184 DV 29 4 940 V 740 DK 184 DV 28 8 939 Y 737 DK 184 DV 28 4 436 819 DK 207 09 45 4 489 810 DK 204 09 54 4 998 Y 790 DK 198 DY 74 4 996 Y 82 DR 195 DV 3 4 595 Y 786 DK 197 DY 73 3848 00 31 34 1152008 1 POLL CAPS NUM 7 1 Using light pen to touch a point on touch panel 2 X Y values are touch panel coordinates 3 DX DY values are LCD coordinates DX 0 DY 0 if touch panel is not calibrated 4 Enter number 0 to return to main screen 6 User Manual Ver 02 sS e M S G Enter number 7 for touch panel calibration 5 point test BRB we Sel SRF WAO BET Dg 258 D8 DEMO TEST ver 3 00 2 24c512 2nd UART Test EEPROM SPI Master SPI Slave Touch Calibration 5 point LCD Test Brightness Point 1 5 120 64 ND CO CG OT
38. fied location of text layer Syntax void IcdPrintString uint8 t x start uint8 t start char string uint8 t str count Parameters x start X coordinate of start location that input string will be printed UNIT 8 8 pixel y_ Start Y coordinate of start location that input string will be printed UNIT 8 8 pixel string string will be printed to LCD str_count character count of input string Return value None IcdDrawBit Function ON OFF the pixel on specified location of graphic layer Syntax void IcdDrawBit t X uint8 char bit value Parameters X X coordinate of the location will be drawn UNIT pixel y Y coordinate of the location will be drawn UNIT pixel bit value 1 ON the pixel 0 OFF the pixel Return value None 6 User Manual Ver 02 82 _ IcdDrawRect Function Draw rectangle single line graphic layer void IcdDrawRect t t t t Parameters X coordinate of the top left point of rectangle UNIT pixel Y coordinate of the top left point of rectangle UNIT pixel X coordinate of the bottom right point of rectangle UNIT pixel Y coordinate of the bottom right point of rectangle UNIT pixel Return value None 6 User Manual Ver 02 83 F w 4 3 3 7 Backlight PWM control function Header file
39. ities function description Appendix A LCD Controller Specification Appendix B EEPROM Specification Appendix C ATMEL ATmega644p MCU Specification BEGV643A User Manual Ver 02 pour NO LYMIN M S Precaution FCC CAUTION This device is designed to meet the requirement in part 15 of the FCC rules Operation is subject to conditions ruled under FCC part 15 6 User Manual Ver 02 TE rn n w Please check packing content upon receiving BEGV643A parcel make sure that all materials and options are packed inside parcel according to your order Packing Contents Check List BEGV643A LCD Embedded module Touch panel Software Utility Disc ISP Cable option 1 ATMEL software development tool 6 User Manual Ver 02 adi _ s w Chapter 1 Introduction Abstract This chapter is to offer you basic information regarding BEGV643A to help you incorporate BEGV643A into your system Contents include 1 1 Features 1 2 Board Layout 1 3 Block Diagram 1 4 Mechanical Dimension 1 5 Board Specifications 1 6 Ordering information 6 User Manual Ver 02 Te f 1 1 Features This BEGV643A is designed based ATmega644p microprocessor which requires no operating system to run on Together with a 320x240 STN LCD and LED backlight built in this all in one LCD embedded system BEGV643A help designer enhan
40. lt _ Tm Unsigned Chars funsigned char 11059200 he Unsigned Bitfields funsigned bitfield Pack Structure Members fpack struct Short Enums fshort enums Create Hex File Generate List File Generate Map File Choose General and key in necessary information to AA continue BEGY 6414 demotest Project Options BEGV643A User Manual Ver 02 39 n s w H VALUEADD 3 weilei m WinAVR 20081205 Wind R 20090313 Choose Include as File Search Path to continue BEGY 6414 demotest Project Options Click Yes to continue BEGV643A User Manual Ver 02 40 2 BOLYMIN m H After executing AVR Studio 4 16 on PC designer can see key information on 5 windows AVR Stndin ID AA VPXRE2A4 1128 demntesttMdam cl File Poject Build Edit View Tools Debug Window Help 22 gt BAG BEGV641A demotest default J Source Files a2d c DemoPrg c i2ceeprom c E Main c MainUtility c S 16963c c E TestParten c S uarte Header Files E a2d h E avrlibdefs h E avrlibtypes h E i2ceeprom h Gy External Dependencies Other Files include stdINC h include uart h include i2ceeprom h include lt avr eeprom h gt include a2d h include lt string h gt extern vold extern vold extern vold exter
41. n vold extern vold extern vold extern void extern void extern void extern vold const char const char const char const char MainProgram uart 1nlt drv wCmd unsigned char drv DspData unslgned char drv wDat unslgned char unsigned char drv Inlt FULL WLINE HLINE CrossDot szCross 8 szCrossLeft 8 szCrossRight 8 szCircle 8 0 10 0 10 0 10 Oxfe 0 10 0 10 0 10 0x00 8 0 24 0x42 Ox81 Ox81 0 42 0 24 0 18 locate uint8 t x uint8 t y void draw char ulnt8 t x ulnt8 t y char szPattern i 24C512 U6 001 address 2 ji 24C512 U4 011 address A6 int ulnt8 t ulntl t ulnt8 t const ulnt8_ test uRxData uAdcl uAdc2 uAdc3 uAdc4 szStrlng 64 t szWelcome Welcome to Bolyminl r n JI AD CONVERTER II ANALOG COMPAR JE BOOT LOAD S 0 TIMER COUNTER 1 TIMER COUNTER 2 sj TWI ij S2 USARTO lj 3 USARTI j WATCHDOG DERI X Name Address Value 0x78 aP ADCSRA na 0x74 ADCSRB Dx7B 0 7 0 7 Bits 00000000 o 000 090090000 DAAVRYBE240128 demotestiMain c Program 42568 bytes 65 0 Full text data bootloader Data 203 bytes 5 0 Full data bss noinit Build succeeded with 0 Warnings 2 Build 9 Message Find in Files gh Breakpoints a
42. nd Tracepoints ATmegs644P Lis Col24 NUM 1 Project management window AVR GCC EEG 76415 demotest default a Source Files B a2d c DemoPre c Tee Mainc E E pic 69636 c TestParten Im HEEB i 2 Files h a2d h h avilibdefs h PM a om h spi h h sHINC h h t6363c vart h 7 External Dependencies 59 Other Files dn BEGV643A User Manual Ver 02 41 2 Program editing window AYR Studio DAAYRVBE240128_demotestMMain EIE B Fi Project Build Edit View Tools Debug Window Help 8x include stdINC h BEGV641 demotest default include uart h 2 29 Source Files include i2ceeprom h a include lt avr eeprom h gt include a2d h include lt string h gt 5 AD CONVERTER Name Value 31 AD CONY ERTER JT ANALOG COMPAR a LOAD JE CPU JE EEPROM EXTERNAL INTERR 3J22JTAG 2 PORTA extern void MainProgram extern vold uart inlt extern vold drv wCmd unsigned char extern vold drv DspData unsigned char extern void drv wDat unslgned char unslgned char extern void drv_Init 0 S uarte i i d FULL ON TB Header Files exten void VLINEC 3j S8 POR extern HLINE 22 PORTC E avrlibdefs h extern vold CrossDot sg PoRTD E avrlibtypes h i
43. ser Manual Ver 02 9 w 3 1 MCU Pin Configuration Drawing 3 1 ATmega644p MCU AIN1 OCOA PCINT11 AINO INT2 PCINT10 TI CLKO PCINTS So OCOB PCINT 12 ACKO TO PCINTS ADC2 PCINT2 ADC3 PCINTS us a PA0 PAT 25 0 PD1 PCINT RXD1 26 INTO PD2 PCS TDI PCINT21 4 TDO PCINT20 PCINT 13 MOSI de 1 A4 ADCA PCINTA PCINT14 MISO P 2 5 ADCS PCINTS PCINT15 SCK 3 diy ADC6 PCINT6 RESET CJ 4 PAT ADCT PCINT7 VCC 5 AREF GND 6 GND XTAL2 T AVCC XTAL1 8 TOSC2 PCINT23 PCINT24 RXD0 PDO 19 TOSCT PCINT22 10 11 ee L PCINT18 SCL PCO LJ PCINT17 SDA 1 PCINT18 TCK PC2 L PCINT18 TMS L PCINT29 OC1A PCINT30 OC2B ICP PCINT31 0C2A PCINT TXD1 27 INT1 PCINT28 XCK1 OCT1B BEGV643A User Manual Ver 01 20 w_ 5 l l D 3 2 MCU Port Mapping 3 2 1 LCD Controller Table 3 2a PORTD 4 PORTC 5 LCD RD 3 2 2 Touch Panel Table 3 2b 3 2 3 RS 232 RS 422 RS 485 Table 3 2c RS 232 422 485 Table 3 2d Enable RS 485 3 2 4 Enable Backlight Table 3 26 Enable Backlight 3 2 5 Table 3 2f 3 2 6 2 wire serial port Table 3 24 6 User Manual Ver 02 als NO LYMIN f s s w 3 2 7 SPI Table 3 2h
44. stive touch panel Serial Ports Support 1 x RS232 port and 1 x RS232 RS422 isolated RS485 isolated co shared port Support 1 x full duplex three wired synchronous data transfer SPI port Support 1 x two wired serial interface to 250 KHz data transfer speed 1 6 Ordering Information Table 1 6 RS232 A RS232 B RS422 RS485 Dual RS232 Lo One RS232 Ca BEGV6A3A2 OneRS232OneRSA22 v oo 64 OneRS232OneRSA88 x Display FSTN Positive LCD LED White Backlight Default 6 User Manual Ver 02 8 M r NEN Chapter 2 Installation Abstract This chapter is to offer designer fundamental information of BEGV643A jumpers and connectors in order to help designer configure correct setting and connection between BEGV643A and system application Contents include 2 1 Jumpers 2 2 Connectors 6 User Manual Ver 02 9 r 2 1 Jumpers This section is to indicate location and function of each jumper on BEGV643A which user can arrange according to the needs of different application desired Be careful when setting jumper user maybe need tool such as needle nose pliers to help setting Please note jumpers not described here are intended to keep as factory default setting Please consult Bolymin before trying to change default setting The table listed below describes lo
45. t eeprom_write_byte Function to write 1 byte to MCU EEPROM Syntax void eeprom_write_ byte uint8 t address uint8 t value Parameters address E PROM address to write in range 0 Ox7FF value E PROM data to write in Return value None eeprom read byte Function This function read one byte from EEPROM Syntax uint8 t eeprom read byte uint8 address address E PROM address to read range 0 0x7FF Data reading from eeprom_write_ block Function to write block data to EEPROM Syntax void eeprom write byte void pointer ram const void pointer_eeprom size t n Parameters pointer ram index of block data to write in pointer eeprom E PROM address to write in range 0 Ox7FF n length EPROM data to write in Return value None eeprom read block Function to read block data from EEPROM Syntax uint8 t eeprom read block void pointer ram const void pointer_eeprom size t n Parameters pointer_ram index of block data to read pointer eeprom address of EPROM to read rnage 0 Ox7FF n length of E PROM data to read Data block read to 6 User Manual Ver 02 78 ww f 4 3 3 5 Touch function Header file touch h a2d h object file touch o a2d o touchlnit Function Initial Touch panel Syntax void touchlnit uint8 t touchGet int pX int pY to read X Coordinate from touch data to
46. t UART PORTO 1st Uart port UART PORT1 2nd Uart port None uartEnableTx Function to Enable or Disable UART transmitter When UART port is applied on RS485 or 5422 transmitter must be set to Disable and to Enable transmitter only when sending data Syntax void uartEnableTx t bEnable Parameters bEnable TRUE Enable transmitter FALSE Disable transmitter Return value None 6 User Manual Ver 02 73 W 4 4 3 2 function Header file i2ceeprom h object file i2ceeprom o i2clnitial Function Initial 2 functions User should call this function before using 12C functions Syntax void i2clnitial Parameters None Return value None i2cReadByte Function to read 1 byte data from C Syntax uint8 t i2cReadByte t uDevAddr uintG t nAddr Parameters uDevAddr IC device address address of three 24c512 on board are A2nex A4 nex nAddr address to write Data reading from C i2cWriteByte Function to write 1 byte data from C Syntax void i2cWriteByte uint8 t uDevAddr uint t nAddr uint8 t byData Parameters uDevAddr device address address of three 24c512 on board are A2hex Ad nex A6 hex nAddr address to write byData data to write in Return value None i2cSetSpeed Function to set baud rate for I2C Syntax void i2cSetSpeed uintG t nSpeed uSpeed baud r
47. t function test test ERE mi SEE dmERCE RAO FAC Be D a 28 8 DF Brightness Test 1 Brightness 5 2 Brightness 5 0 EXIT Brightness 50 3848 00 10 44 115200844 SCROLL CAPS NUM 1 Enter number 1 to backlight brightness 5 2 Enter number 2 to backlight brightness 5 3 Enter number 0 to return to main screen 6 User Manual Ver 02 61 w 4 4 Free Software Utilities 4 4 1 Website Links Touch Panel Driver www bolymin com tw embedded utility BEGV643A tpdriver zip e UART Driver RS 232 485 422 www bolymin com tw embedded utility BEGV643A uartdriver zip e SPI Driver www bolymin com tw embedded utility BEGV643A spidriver zip C Driver www bolymin com tw embedded utility BEGV643A i2cdriver zip e Backlight Driver www bolymin com tw embedded utility BEGV643A backlightdriver zip e LCD Driver www bolymin com tw embedded utility BEGV643A Icddriver zip BEGV643A User Manual Ver 02 62 _ s w 4 4 2 Introduction of Bolymin software utilities It is recommended to use Bolymin software utilities in order to speed up project development phase However designer may develop your own software utilities if you find Bolymin utilities is not convenient to use On following paragraphs we explain the way to add Bolymin software utilities into designer PC AYR Studio
48. to Install the Program The wizard is ready to begin installation Click Install to begin the installatian IF ynu want to review or change any of pour installation settings click Back Click Cancel to exit the wizard InstallShield adi y Click install to begin installation BEGV643A User Manual Ver 02 29 2 BOLYMIN w L Setup Status AvHRHStudind i configuring your new software installation Installshield Wait for seconds for installation BEGV643A User Manual Ver 02 30 2 BOLYMIN n s w K YF Studio InstallShield Wizard InstallShield Wizard Complete The InstallShield Wizard has successtully installed AYAStudio4 Click Finish to exit the wizard Cs Click finish to exit the installation BEGV643A User Manual Ver 02 31 _ 4 1 2 Additional tool for language For C language designers additionally please download and install AVR gcc from http sourceforge net project downloading php group id 68108 amp filename WinAVR 20090313 install exe amp a 6 759369 SES WinAYE 20090313 instsll exe Double click to install WinAVR Installer Language Please select a language Chinese Traditional bul Chinese Traditional Choose your language to install WinAYR
49. yer Syntax void IcdSwitchDisplay uint8 t display switch Parameters display switch Display switch flag DS DISPLAY OFF Turn off all display DS TEXT ON Turn ON the display of text layer DS GRAPHIC ON Turn ON the display of graphic layer DS CURSOR ON Turn ON the display of cursor DS BLINK ON Turn ON cursor blink This flag is available while cursor is ON Return value None Turn OFF all display IcdSwitchDisplay DS DISPLAY OFF Turn ON the display of text and graphic layer Turn OFF cursor IcdSwitchDisplay D8 TEXT ON 05 GRAPHIC Turn ON the display of text layer and cursor without blink Turn OFF graphic layer IcdSwitchDisplay D8 TEXT DS CURSOR Turn ON the display of text layer graphic layer and cursor with blink IcdSwitchDisplay D8 TEXT ON DS GRAPHIC ON DS CURSOR DS BLINK ON ssssr csr rr mn Ia BEGV643A User Manual Ver 02 80 r rn w IcdSetDispMode Function Set the display mode between graphic layer and text layer void IcdSetDispMode t new_mode 5 New_mode New display mode between graphic layer and text layer Value DM OR MODE DM MODE DM AND MODE DM_OR_MODE LEN Nou m i E n n a vm a E El Return IcdDraw Function Draw input binary picture specified area graphic area Syntax void IcdDraw

Download Pdf Manuals

image

Related Search

Related Contents

Plan de formation  Enquête québécoise sur le tabac, l`alcool, la drogue et le jeu chez  ANL9068000DEGB0814NG2015-03  USER`S MANUAL Networking  Samsung SMH8165ST User Manual  Canon SX230 User's Manual  1783 Manual - Visara International  Samsung LW32A33W Käyttöopas  ic2000 / ic4000 controller installation and user manual  RM-2000 取扱説明書ダウンロード  

Copyright © All rights reserved.
Failed to retrieve file