View Full Version : NMIY-0031 board stuff
nar79161
11-01-02, 03:11 PM
Hello all,
Im new to this game and am getting into it for a school engineering project. I was wondering how to go about programming this sucker, i tried for about 5 hours straight to no avail. I read through the stufff on the disk but am still lost. What should i use to write the code? to transfer the code? will i see anything on the LCD screen when i DL the code? Ive done alot with computers so i know the process off hooking the stuff together.... its just not being able to see what the board is doing that is throwing me offf. Thanks for any help - DJ
nar79161,
On power up you will not see anything on the LCD but a dark line filled with small square boxes until you down load the driver for it. You can also manually send the character to the LCD by enter line by line of data to initialize the lcd and display the data on the lcd. This explained in the manual under PROGRAM SEGMENTS on page 39.
I don't know what programming language are you familiar with but i like to start out with the SmallC since your board is come with the 8051 monitor onboard i assumed.
First, modify the memory configurations in the common51.c so that you can load the hex file to the ram on board as below,
; MEMORY MAP for RAM
====================================
.EQU RAM,H'8000 ; starting address of data RAM, NEVER 0!
.EQU STACKTOP,H'9FFE ; initial stack pointer, MUST BE EVEN! If you have a 32K ram you can set at H'FC00
.EQU ROM,H'8400 ; starting address of program ROM, usually 0
.EQU LITROM,H'9C00 ; ROM address where literals will be stored. If you have a 32K ram you can set at H'6000
Saves the common51.c file with new memory configurations.
Compile the LCDTEST.C program. At the DOS prompt enter CC LCDTEST. It will generate the LCDTEST.OBJ file. This is the hex file, you need for downloading.
Run MAXTERM terminal program. Press ALT+P and set PACING character to decimal 10.
At the Terminal mode enter L then press alt+D to download. Make sure you enter the full path name where the LCDTEST.OBJ is and hit Return key you will see the hex file is loaded line by line on the screen.
When it finished downloading, enter X 8400 and hit return key, your C program will be executed. By pressing the button(s) on the keypad you will see the data display on the LCD.
nar79161
11-02-02, 08:48 AM
I tried to do what you said but i dont know if it worked. I "Think" i downloaded the file correctly, but MAXTERM wont let me type in words.. like when you said type "G 8400" it wouldnt come up on the maxterm screen as i typed, i can only execute Alt+.... commands. another question is do i have to turn the power off to the board after i download or reset? How can i see whats in its memory?? how do i know if what i did worked??? im still finding this difficult because i have no way of telling whats on there like when i work with computers. If i install a program on my PC i can tell if its there or not. With this its just a shot in the dark....Thanks Again, DJ
nmitech
11-04-02, 01:11 PM
Oop! sorry the execute command is "X" not "G" and to execute the program you need to enter X 8400. Sorry for the confusion. When the LCDTEST program is executing you will see the first line of the LCD is clear and the prompt is displayed on the 1st character. Each time you press a button on the keypad provided with the NMMIY-0031 SPCL package, it will display the row and the column of the button you pressed. Something like this, 1,1 or 2,3 or 4,2 etc...
FYI, For a list of the monitor commands, at the monitor prompt >, just enter H for help.
nar79161
11-04-02, 01:40 PM
yea i wouldnt even have noticed lol. I think one other problem that was wrong was i couldnt even type that command. Like do i have to hit a key to bring up a command box to put in the X 8400 command? i cant just type in the monitor and have it come up on the computer screen like when i am typing this now. The only time i can enter text into the dos program is when i hit like Alt+d and have to type in the file name.... other than that im stuck to alt+commands. I guess what im trying to say in a nutshell is there a Alt+ command to bring up a box to type in the X 8400 command or do i just type after its done downloading. I checked the help menu and didnt see anything.thanks again DJ
nmitech
11-04-02, 02:36 PM
For a list of the 8051 monitor commands, first invoke MAXTERM and you will see the monitor prompt ">" each time you hit return key. Now just enter H to display the HELP menu. Make sure the cap lock is ON because the monitor commands are case sensitive.
For a list of the Maxterm Terminal commands, at the terminal mode, press ALT+H to display the help menu.
To Load a program, first enter L then press ALT+D and enter the complete file directory: C:\NMIY0031\SMALLC\LCDTEST.OBJ and hit return key. You will see the hex file is displayed line by line on the screen then wait until it finishs and you will see the prompt >, just enter X 8400 to execute your program.
:10-------------
:10-------------
:08-------------
:10-------------
>X 8400
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.