4-1-2 Additional tool for C language 4-2 Execute AVR studio 4.16 on designer PC 4-3 In-system programmer AVR ISP mk II 4-4 Bolymin Free Software Utilities 4-4-1 Website links 4-4-2 Introduction of BOLYMIN software utilities 4-4-3 Software utilities function...
Page 3
Precaution WARNING 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. BEGV643A User Manual Ver.02 - 3 -...
Page 4
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) ATMEL software development tool BEGV643A User Manual Ver.02 - 4 -...
Page 5
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 BEGV643A User Manual Ver.02 - 5 -...
1-1 Features This BEGV643A is designed based on 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 enhance a compact design with cost saving, space saving, and design phase saving. Armed with RS232, RS422/485, I C and SPI interface port, this BEGV643A communicates many devices and peripherals.
Page 8
1-5 Board Specifications (Table 1.5) ® High-performance, Low-power AVR 8-bit microprocessor ATMEL ATmega644P 64K Bytes In-System Self-Programmable Flash Memory 2K Bytes Internal EEPROM 4K Bytes Internal SRAM 3 x 64K Bytes External EEPROM(optional) Support 8-bit single-scan resolution 320 x 240 monochrome STN LCD, with Display edge LED white backlight only Support four-wired resistive touch panel...
Page 9
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 BEGV643A User Manual Ver.02 - 9 -...
Page 10
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 location and function of each available jumper.
Page 11
2-1-2 Frame Ground (Drawing 2.1.2) Frame ground short Connect metal frame with GND open Not connected metal frame with ground default 2-1-3 RS-422/RS-485 VDD/Ground (Drawing 2.1.3) RS-422/RS-485 VDD/Ground short short 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 -...
Page 12
2-1-4 Screw hole ground (Drawing 2.1.4) Frame ground short Connect screw hole with GND open Not connected screw hole with ground default 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.
Page 13
Pin Types =Input =Output =Input / Output (Bi-Directional) =User defined =Power Pin Definition: BEGV643A-Dual RS232 (Table 2.2.1a) Pin No. Signal Pin No. Signal EEPSDA EEPSCL EEPWP /Reset MOSI MISO Pin Definition: BEGV643A1-One RS232 (Table 2.2.1b) Pin No. Signal Pin No. Signal EEPSDA EEPSCL...
Page 15
2-2-1-2 Serial I/O (Table 2.2.1.2) Signal Type Pin No. Description SPI Chip select MOSI is the mater data output line, when SPI on module is MOSI configured as a master. When SPI is configured as a slave. This pin reverse the role. MISO is the master data input line, when SPI is configured master.
Page 16
2-2-2 Pin vs. Function Diagram 2-2-2-1 Power/LCD/Backlight Diagram of system power supply, and contrast adjustment. BEGV643A Vadj Vout /Reset 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.
Page 17
2-2-2-4 SPI BEGV643A offers SPI port. Designer has to define this port as SPI by software, or to use Bolymin SPI driver (free utility). BEGV643A M OSI M OSI M ISO M ISO Slave M aster BEGV643A M OSI M OSI...
Page 19
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, EEPROM/I 2-wire serial port, SPI, and General I/O. BEGV643A User Manual Ver.02 - 19 -...
3-2-7 SPI (Table 3.2h) MCU ATmega644P PORTB.4 PORTB.5 MOSI PORTB.6 MISO PORTB.7 3-2-8 General I/O (Table 3.2i) MCU ATmega644P General I/O PORTA.4 PORTA.7 BEGV643A User Manual Ver.02 - 22 -...
Page 23
Chapter 4 Software Development Tool & Utility Abstract This chapter explains ATmega644p MCU software development tool AVR ISP mkII writer and Bolymin free software utilities. BEGV643A User Manual Ver.02 - 23 -...
Page 24
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_id=2725, or from BOLYMIN utility disk. 4-1-1 Download software from AVR Studio website step1: Download design software Click here to download AVR Studio 4.16...
4-1-2 Additional tool for C language For C language designers, additionally please download and install AVR gcc from http://sourceforge.net/project/downloading.php?group_id=68108&filename=WinAVR-20090313- install.exe&a=6759369 Double click to install WinAVR Choose your language to install Close other applications to continue BEGV643A User Manual Ver.02 - 32 -...
Page 33
Click I agree to continue Choose folder to continue BEGV643A User Manual Ver.02 - 33 -...
Page 34
Choose components to install Wait for seconds for installation BEGV643A User Manual Ver.02 - 34 -...
Page 35
Click finish to exit installation ** AVR Studio and AVR gcc software are also available on Bolymin utility disk or Bolymin website. BEGV643A User Manual Ver.02 - 35 -...
Page 36
4-2 Execute AVR Studio 4.16 on designer PC Start All programs Atmel AVR Tools AVR Studio 4 Click New Project to start Choose Atmel AVR Assembler (assembly language), or AVR GCC(C code) BEGV643A User Manual Ver.02 - 36 -...
Page 37
Choose AVR GCC here (All Bolymin utility drivers are designed with C code), and key in Project Name and Initial file. Choose AVR Simulator, ATmega644P, and click Finish to continue BEGV643A User Manual Ver.02 - 37 -...
Page 38
Here you can see software design screen, yet no hurry to start software design yet. Choose Project Configuration Options to continue BEGV643A User Manual Ver.02 - 38 -...
Page 39
Choose General and key in necessary information to continue Choose Include Directories, and Include File Search Path to continue BEGV643A User Manual Ver.02 - 39 -...
Page 40
Choose Include as File Search Path to continue Click Yes to continue BEGV643A User Manual Ver.02 - 40 -...
Page 41
After executing AVR Studio 4.16 on PC, designer can see key information on 5 windows: [1]. Project management window BEGV643A User Manual Ver.02 - 41 -...
Page 42
[2]. Program editing window BEGV643A User Manual Ver.02 - 42 -...
Page 44
4-3 In-System Programmer AVR ISP mkII ** Inside mkII box(1), designer will get DVD(2), mkII device(3), and USB cable(4). Please be sure that all parts are packed inside. BEGV643A User Manual Ver.02 - 44 -...
Page 45
Steps: 1.Get mkII connected to PC Choose Tools Program AVR Connect to continue Choose AVRISP mkII USB Connect to continue BEGV643A User Manual Ver.02 - 45 -...
Page 46
Choose Hex file for ATmega644p flash Program Choose Hex file for ATmega644p EEPROM Program Choose ELF file for fuses and lockbits Program BEGV643A User Manual Ver.02 - 46 -...
Page 47
Start software burning Choose Auto and necessary configure and click Start to program BEGV643A User Manual Ver.02 - 47 -...
Page 48
Good job! Software burning is done! BEGV643A User Manual Ver.02 - 48 -...
Page 49
Product Function Verify On PC: Start All programs Telecommunication Hyper Terminal Please define a name and choose a icon for this connection, and click Yes to continue. Choose a suitable COM port, and click Yes to continue. BEGV643A User Manual Ver.02 - 49 -...
Page 50
Key in COM port setting:115200/8/No/1/No, and click Yes to continue. BEGV643A User Manual Ver.02 - 50 -...
Page 51
Turn on BEGV64.A power, and designer will see this screen. After seeing above screen, designer can operate on PC & BEGV643A: A). Enter number “1”: for I C EEPROM function test (1 EEPROM) B). Enter number “2”: for 2 UART function test C).
Page 52
A). Enter number “1”: for I C EEPROM function test (1 EEPROM) 1). Enter number “1”: for I C EEPROM function test (1 EEPROM) 2). Enter number “2”: for I C EEPROM function test (2 EEPROM) 3). Enter number “3”: for I C EEPROM function test (3 EEPROM) 4).
Page 53
B). Enter number “2”: for 2 UART function test 1). Enter number “1”: to send 1 byte (0x55) 2). Enter number “2”: to send 1 byte (0xAA) 3). Enter number “3”: to send 1 word (0x5555) 4). Enter number “4”: to send 1 byte (0xAAAA) 5).
Page 54
C). Enter number “3”: for ATmega644P internal EEPROM setting ** 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).
Page 55
D). Enter number “4”: for 4-wire SPI Master function test 1). Enter number “1”: to send 1 byte (0x55) 2). Enter number “2”: to send 1 byte (0xAA) 3). Enter number “3”: to send 1 word (0x5555) 4). Enter number “4”: to send 1 byte (0xAAAA) 5).
Page 56
E). Enter number “5”: for 4-wire SPI Slave function test 1). Enter number “1”: to receive 1 byte 2). Enter number “2”: to receive 1 word 3). Enter number “0”: to return to main screen BEGV643A User Manual Ver.02 - 56 -...
Page 57
F). Enter number “6”: to read from touch panel 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).
Page 58
G). Enter number “7”: for touch panel calibration (5 point) 1). On the LCD, designer will see displays. Please use light pen to touch center point of until it turns to . Such, one point is calibrated. 2). Please repeat above process to calibrate 5 points. 3).
Page 59
H). Enter number “8”: for LCD function test 1). Enter number “1”: to LCD show full on 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).
Page 60
H line Half Cross dot Character Picture1 Picture2 BEGV643A User Manual Ver.02 - 60 -...
Page 61
I). Enter number “9”: for backlight brightness adjustment function test 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 BEGV643A User Manual Ver.02 - 61 -...
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.
Page 64
Choose Include as File Search Path to continue BEGV643A User Manual Ver.02 - 64 -...
Page 65
Note: For touch panel calibration, Floating-point operations is necessary, so please add libm.a and libprintf_flt.a in WinAVR. BEGV643A User Manual Ver.02 - 65 -...
Page 72
uartDisablePort Function: to stop operation of assigned Uart port Syntax void uartDisablePort ( uint8_t byPort Parameters byPort UART_PORT0 – 1st Uart port UART_PORT1 – 2nd Uart port Return value None. uartSendString Function: to send 1 string from assigned UART port Syntax void uartSendString( uint8_t...
Page 73
uartFlushReceiveBuffer Function: to clear receiving buffer on assigned UART port Syntax void uartFlushReceiveBuffer( uint8_t byPort Parameters byPort UART_PORT0 – 1st Uart port UART_PORT1 – 2nd Uart port Return value None. uartEnableTx Function: to Enable or Disable UART transmitter. (When UART port is applied on RS485 or RS422 , transmitter must be set to Disable, and to Enable transmitter only when sending data.) Syntax void uartEnableTx(...
Page 74
4-4-3-2 I C function Header file : i2ceeprom.h object file : i2ceeprom.o i2cInitial Function: Initial I2C functions. User should call this function before using I2C functions. Syntax void i2cInitial( Parameters None. Return value None. i2cReadByte Function: to read 1 byte data from I Syntax uint8_t i2cReadByte( uint8_t...
Page 77
spiTransferByte Function: to send and read 1 byte data from SPI port Syntax uint8_t spiTransferByte( uint8_t data Parameters data byte to be sent Return value 1 byte data reading from SPI spiTransferWord Function: to send and read 1 word from SPI port Syntax Uint16_t spiTransferByte( uint16_t...
Page 78
4-3-3-4 E PROM function PROM Function is built inside WinAVR, so users need only to include eeprom.h in program to call E PROM Function. For exmaple #include <avr/eeprom.h> eeprom_write_byte Function: to write 1 byte to MCU EEPROM. Syntax void eeprom_write_byte ( uint8_t* address, uint8_t...
Page 79
4-3-3-5 Touch function Header file : touch.h, a2d.h object file : touch.o, a2d.o touchInit Function: Initial Touch panel. Syntax void touchInit( Parameters None. Return value None. touchGet Function: to read touch data from touch panel Syntax uint8_t touchGet( int * int * Parameters to read X Coordinate from touch data...
Page 80
4-3-3-6 LCD control function Header file : RA8806.h object file : RA8806.o lcdInit Function: Initialize all parameters of LCD display. User should call this function before use functions of LCD display. void lcdInit ( Syntax Parameters None. Return value None. lcdDisplayClr Function: Clear screen (include graphic and text layer).
Page 81
lcdSetDispMode Function: Set the display mode between graphic layer and text layer. Syntax void lcdSetDispMode ( uint8_t new_mode Parameters New_mode New display mode between graphic layer and text layer. Value : DM_OR_MODE, DM_XOR_MODE, DM_AND_MODE Content on Graphic layer Content on Text layer DM_OR_MODE DM_XOR_MODE DM_AND_MODE...
Page 82
lcdFillByte Function: Fill input byte value on specified area of graphic layer. Syntax void lcdFillByte ( uint8_t x_start, uint8_t y_start, uint8_t x_end, uint8_t y_end, uint8_t data, uint8_t mode 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.
Page 83
lcdDrawRect Function: Draw rectangle by single line on graphic layer. Syntax void lcdDrawRect ( uint8_t x_start, uint8_t y_start, uint8_t x_end, uint8_t y_end, Parameters x_start X coordinate of the top-left point of rectangle. (UNIT=pixel) y_start Y coordinate of the top-left point of rectangle. (UNIT=pixel) x_end X coordinate of the bottom-right point of rectangle.
Page 84
4-3-3-7 Backlight PWM control function Header file : bklight_pwm.h object file : bklight_pwm.o Note:Backlight PWM control used TIMER0 and INTERRUPT0 bklPWM_Init Function: Initialize all parameters of backlight PWM control function. User should call this function before use backlight PWM control functions. void bklPWM_Init ( Syntax Parameters...
Page 85
Appendix A: 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/doc8011.pdf BEGV643A User Manual Ver.02 - 85 -...
Page 86
<END of BEGV643A User Manual> BEGV643A User Manual Ver.02 - 86 -...
Need help?
Do you have a question about the BEGV643A Series and is the answer not in the manual?
Questions and answers