Step 1. Type in the following program in a text editor like notepad and save
it as hello.c
.
#include <board.h>
#include <lcd.h>
int main()
{
board_init();
lcd_init();
lcd_puts("Hello World!\n");
return 0;
}
Step 2. Open a DOS box, switch to the folder containing the C file and compile it using the following command.
> zcc zkit-51-v664 hello.c
Step 3. Fix the errors, if any and check the folder for executable file with
the extension ihx
.
Step 4. Connect the ZKit-51-V664 to the PC using the USB cable. Open Flash Magic, select the following parameters in the Flash Magic window, under Communications section.
Step 5. Select the Erase block used by Hex File
check box, under the Erase
section.
Step 6. Select the hex file generated in Step 3, under the Hex File
section.
Step 7. Click on the start button to download the hex file, on to the micro-controller.