View Full Version : Some questions about NMIY-0031. Please help me!
Hello,
I asked a few questions some time ago, but I need to ask a few new questions about the way of programm one of NMIY micros.
Can you help me? I would be very grateful to you for your answers.
I have a <NMIY-0031 8051 CPU V1.0>. It has a chip where puts: <NMIY-0031 MONITOR 1996 New Micros>, and a big chip where is written: <SIEMENS 644-318-2 V 4.0 SAB8051A-16-N AUSTRIA BC INTEL'80>. This is the image: <http://www.newmicros.com/store/product_thumbnails/NMIY-0031.jpg>
These are the questions:
1st) The only way I get to send a string to serial port was the following:
**********************************************
.ORG H'8000
MOV DPTR,#(STRING1 - 1H)
LCALL 012AH
STRING1: .DB "HELLO WORLD\0"
***********************************************
But this always inserts a space character before my string. How can I avoid this space?. I have to say that I use <#(STRING1 - 1H)> instead <STRING1>, otherwise the first character of the string is eliminated (I don't
know why).
2nd) I need to manage 2 interruptions, so I decided to use the external INT0 and INT1 lines. I used a code similar to this:
************************************************************
.ORG H'0003 ;DEFINE INT0 HANDLER
LCALL INTER0
RETI
.ORG 8000 ;BEGIN OF CODE
MOV A,#H'85 ;SET IE TO ACCEPT INT0
ORL A,IE
BUCLE: AJMP BUCLE ;WAITING FOREVER, FOR THE INTERRUPTION
INTER0: PUSH PSW ;MANAGEMENT OF INT0
PUSH ACC
MOV DPTR,#(STRING0 - 1H)
LCALL 012AH
POP ACC
POP PSW
RET
STRING0: .DB "HELLO WORLD\0"
************************************************************
But nothing happens when I make a shorcircuit between INT0 (J5,PIN 17) and GND (J5,PIN 1) pins of J5 to simulate a interruption. What's the problem? Are these the wrongs INT0 pins? Anything wrong on the ASM code? Please help me!
3rd) I'm not sure about the micro I have. It's an Intel 8085? 8085A? 8031? The chip has written upside, <SIEMENS 644-318-2 V 4.0 SAB8051A-16-N AUSTRIA BC INTEL'80>, but I can't use all the instruction set of an 8085, because the <PseudoSam(tm) 51 assembler. V1.7.00> that New Micros provide me, gives the error: "Unknow opcode". But instead, the 8085 instrucction set works fine. Can you say me where can I find a full instruction set for my micro please?
4th) In the manual is written: <"See an 8031/51A data book for details on timer, counter, and interrupt programming.">. Can you recommend me a good one for my micro?
Thank you.
I look forward to hearing from you.
RAUL GLEZ.
rgprgp@latinmail.com
rgprgp@mixmail.com
nmitech
11-26-02, 05:17 PM
**********************************************
.ORG H'8000
MOV DPTR,#(STRING1 - 1H)
LCALL 012AH
STRING1: .DB "HELLO WORLD\0"
***********************************************
But this always inserts a space character before my string. How can I avoid this space?. I have to say that I use <#(STRING1 - 1H)> instead , otherwise the first character of the string is eliminated (I don't
know why).
I found this MOV DPTR,#(STRING1 - 1H) inserted a junk character at the beginning of the string. Where this,MOV DPTR,#STRING1 does not insert or eliminate any character as you experienced.
The INT0 interrupt vector is moved to 8003h as stated in the monitor.doc file
Here is the working interrupt INT0 sample program provided with the diskette,
; EX0, interrupt driven routine - running under monitor V1.1
.ORG H'8003 ; EX0 INTERRUPT VECTOR
LJMP EX0_ISR
.ORG H'8040 ; PROGRAM START
LJMP MAIN
EX0_ISR MOV A,#H'AA ; EX0 interrupt service routine
MOV P1,A
ACALL DELAY
MOV A,#H'55
MOV P1,A
ACALL DELAY
RETI ; return from interrupt
DELAY MOV R0,#H'FF
LOOP1 MOV R1,#H'FF
LOOP2 DJNZ R1,LOOP2
DJNZ R0,LOOP1
RET
MAIN CLR IE.7
SETB IE.0 ; enable ex0 interrupt
SETB IE.7 ; enable global interrupt
LOOP3 MOV R2,#H'FF
LOOP4 MOV P1,R2
ACALL DELAY
DJNZ R2,LOOP4
AJMP LOOP3
.END
The microprocessor on the NMIY-0031 is SAB8051A manufactured by Siemens now is Infineon. Any 8051 opcode should be compatible.
8051 Reference manual,
http://www.infineon.com/cgi/ecrm.dll/ecrm/scripts/public_download.jsp?oid=8090&parent_oid=13738
8051 Instruction set,
http://www.infineon.com/cgi/ecrm.dll/ecrm/scripts/public_download.jsp?oid=27537&parent_oid=-8136
Hello:
First of all I want to thank nmitech for his quick reply.
I would like to know where can I find the files he says:
"The INT0 interrupt vector is moved to 8003h as stated in the monitor.doc file
Here is the working interrupt INT0 sample program provided with the diskette"
I have this file: Nmiy0031.zip (1.005.121 bytes), which contains this files and directories (you provide me with this file a long time ago through mail):
********* ZIP FILE CONTENTS ***********
C:\nmiy0031>dir /s
Directorio de C:\nmiy0031
27/11/2002 01:57 <DIRE> ASM
27/11/2002 01:57 <DIRE> BASIC
27/11/2002 01:57 <DIRE> FORTH
27/11/2002 01:57 <DIRE> MANUAL
27/11/2002 01:57 <DIRE> MAXTERM
27/11/2002 01:57 <DIRE> MONITOR
27/11/2002 01:57 <DIRE> SMALLC
Directorio de C:\nmiy0031\ASM
11/06/1991 14:38 74.704 A51.EXE
14/11/1990 10:31 27.606 BROCH.PC
21/06/1999 16:05 1.169 EX0INT.ASM
14/06/1991 08:40 2.709 EXAMPLE.ASM
01/11/2000 17:20 3.032 LCD.ASM
29/03/1991 10:27 23.780 LEVELI.DOC
02/07/1991 07:58 15.929 MNEMTEST.ASM
07/02/1990 15:39 1.465 READI.ME
13/05/1999 10:20 577 SERIAL.ASM
02/11/1986 18:03 240 SYN.ASM
Directorio de C:\nmiy0031\BASIC
15/02/1996 11:57 22.915 BASIC.HEX
24/07/1995 11:06 442.165 BASIC52.DOC
03/10/1996 11:24 538 DISPLAY.BAS
11/05/1995 11:21 165 DUMP.BAS
06/08/1993 09:21 97 README.TXT
Directorio de C:\nmiy0031\FORTH
18/12/1996 11:39 13.806 51FORTH.DOC
11/03/1997 11:09 1.069 AUTOSTRT.4
07/05/1996 09:39 23.033 FORTH31.HEX
28/08/1996 12:18 2.979 GALU9.JED
20/01/1997 17:59 1.393 INTEL.4
20/01/1997 17:59 1.013 IREC.4
04/04/1997 10:52 1.742 MEMMAP.TXT
20/01/1997 18:04 2.671 REGISTER.4
12/01/1993 15:21 504.054 UMMAXV33.TXT
Directorio de C:\nmiy0031\MANUAL
27/11/2002 01:57 <DIRE> DOC_FILE
27/11/2002 01:57 <DIRE> TXT_FILE
Directorio de C:\nmiy0031\MANUAL\DOC_FILE
13/09/1996 08:52 14.848 APPENDIC.DOC
18/09/1996 11:19 104.960 BASICEXA.DOC
17/09/1996 11:42 122.880 CEXAMPLE.DOC
20/09/1996 15:40 699.392 DRAWINGS.DOC
18/09/1996 11:19 75.264 FORTHEXA.DOC
01/10/1996 15:48 65.024 HARDWARE.DOC
20/09/1996 16:02 43.520 INTRODUC.DOC
13/10/1997 12:43 1.017.856 NMIY0031.DOC
18/06/1996 13:44 42.496 NMYMECH.DOC
20/09/1996 15:12 55.808 SOFTWARE.DOC
Directorio de C:\nmiy0031\MANUAL\TXT_FILE
28/08/1996 10:07 48.531 BASICSAM.TXT
28/08/1996 13:41 56.871 CSAMPLES.TXT
28/08/1996 10:08 37.993 FORTHSAM.TXT
18/12/1996 12:13 74.551 NMIY0031.TXT
Directorio de C:\nmiy0031\MAXTERM
25/08/1995 10:22 1.498 INSTALL.BAT
03/04/1996 17:59 714 MAXTERM.CFG
06/10/1995 11:02 16.914 MAXTERM.DOC
27/10/1995 15:25 61.018 MAXTERM.EXE
05/09/1995 16:06 766 MAXTERM.ICO
25/08/1995 10:45 545 MAXTERM.PIF
Directorio de C:\nmiy0031\MONITOR
24/09/1998 11:02 8.198 8051MON.DOC
23/09/1998 11:20 12.586 Y31MON11.HEX
Directorio de C:\nmiy0031\SMALLC
11/06/1991 14:38 74.704 A51.EXE
15/01/1998 09:50 2.527 APNOTE01.TXT
05/07/1995 11:26 112 CC.BAT
05/03/1995 19:19 47.312 CC51.EXE
27/11/2002 01:57 <DIRE> CLIB
30/07/1997 11:33 347 DISPLAY.C
22/12/1998 16:45 1.938 INT0.C
27/01/1997 13:06 3.403 LCDTEST.C
05/03/1995 18:35 83 PCODES.BAT
18/04/1990 11:37 22.500 READ.ME
14/06/1995 15:05 2.671 SC51.APP
13/08/1997 10:55 18.639 SC51.DOC
05/07/1995 11:26 121 TEST.BAT
05/03/1995 18:48 1.835 TEST.C
08/03/1995 16:58 101 TEST1.C
05/03/1995 12:35 2.646 TEST2.C
23/05/2000 09:18 954 TINYTEST.C
Directorio de C:\nmiy0031\SMALLC\CLIB
16/02/1995 20:11 125 ABS.C
05/03/1995 17:18 2.037 ALLOC.C
16/02/1995 20:11 275 ATOI.C
16/02/1995 20:11 454 ATOIB.C
14/09/1998 16:08 10.363 COMMON51.C
05/03/1995 17:17 365 DTOI.C
05/03/1995 18:25 1.100 FGETC.C
05/03/1995 18:22 1.721 FGETS.C
31/05/1995 09:48 2.085 FPRINTF.C
05/03/1995 16:39 513 FPUTC.C
05/03/1995 16:40 263 FPUTS.C
05/03/1995 16:46 2.545 FSCANF.C
05/03/1995 16:47 101 GETCHAR.C
30/10/1998 14:22 632 IOSFR.C
16/02/1995 20:11 2.106 IS.C
16/02/1995 20:11 115 ISASCII.C
16/02/1995 20:11 292 ITOA.C
16/02/1995 20:11 445 ITOAB.C
05/03/1995 17:16 630 ITOD.C
16/02/1995 20:11 563 ITOO.C
05/03/1995 17:16 627 ITOU.C
16/02/1995 20:11 619 ITOX.C
30/05/1995 16:23 423 KEYPAD.C
30/07/1997 11:42 1.991 LCDFPUTC.C
16/02/1995 20:11 176 LEFT.C
16/02/1995 20:11 1.423 LEXCMP.C
05/03/1995 17:16 367 OTOI.C
05/04/1995 10:40 2.498 PEEKPOKE.C
05/03/1995 16:49 421 POLL.C
28/01/1997 11:16 423 PORT1.C
05/03/1995 16:50 112 PUTCHAR.C
05/03/1995 16:51 135 PUTS.C
16/02/1995 20:11 184 REVERSE.C
16/02/1995 20:11 163 SIGN.C
05/03/1995 17:10 1.031 STDIO.H
16/02/1995 20:11 190 STRCAT.C
16/02/1995 20:11 188 STRCHR.C
16/02/1995 20:11 197 STRCMP.C
16/02/1995 20:11 123 STRCPY.C
05/03/1995 17:01 594 STRLEN.C
16/02/1995 20:11 272 STRNCAT.C
16/02/1995 20:11 347 STRNCMP.C
16/02/1995 20:11 267 STRNCPY.C
16/02/1995 20:11 331 STRRCHR.C
03/07/1996 15:31 793 SYSLIB51.C
16/02/1995 20:11 84 TOASCII.C
16/02/1995 20:11 139 TOLOWER.C
16/02/1995 20:11 145 TOUPPER.C
05/03/1995 16:53 353 UNGETC.C
05/03/1995 17:16 363 UTOI.C
05/03/1995 17:16 738 XTOI.C
Total of files:
113 files 3.953.424 bytes
*****************************************
I can't find the file monitor.doc as you said. Can you post a link to a place where I could find this file please?
Can you say me the INT1, TIMER0 & TIMER1 interrupt vector direction please?
THANKS.
RAUL GLEZ.
(rgprgp@latinmail.com)
nmitech
11-26-02, 09:24 PM
From your list, i marked the files mentioned above in red color
Directorio de C:\nmiy0031\ASM
11/06/1991 14:38 74.704 A51.EXE
14/11/1990 10:31 27.606 BROCH.PC
21/06/1999 16:05 1.169 EX0INT.ASM
14/06/1991 08:40 2.709 EXAMPLE.ASM
01/11/2000 17:20 3.032 LCD.ASM
29/03/1991 10:27 23.780 LEVELI.DOC
02/07/1991 07:58 15.929 MNEMTEST.ASM
07/02/1990 15:39 1.465 READI.ME
13/05/1999 10:20 577 SERIAL.ASM
02/11/1986 18:03 240 SYN.ASM
Directorio de C:\nmiy0031\MONITOR
24/09/1998 11:02 8.198 8051MON.DOC
23/09/1998 11:20 12.586 Y31MON11.HEX
EX0INT.ASM is the INT0 interrupt driven example program.
8051mon.doc is included the interrupt vector table in ram
Thanks one more time nmitech!
Now I realize that I had been using an old version of the NMIY-0031 files, so 8051MON.DOC file only contains this:
***************** BOF ******************
Yu-Seok Kim January 25,1993
New Micros,Inc.
Dallas, Texas
NMI 8051 MONITOR V1.0
NMI 8051 MONITOR provides an easy way to access the program and
data memory and special function registers of 8051 processor.
The command line consists of one capital letter and optionally
one or two or three hex numbers.
The available commands and descriptions are following:
--------------------------------------------------------------
H :help
R <addr> :read internal data memory
D <addr> :read external data memory
P <addr> :read program memory
S <addr> :read special function register
A <addr> <size> :dump internal data memory
U <addr> <size> :dump external data memory
M <addr> <size> :dump program memory
W <value> <addr> :write onto internal data memory
O <value> <addr> :write onto external data memory
T <value> <addr> :write onto special function register
F <addr> <size> <value> :fill external data memory with value
X <addr> :execute
Z <addr> <size> :erase internal data memory
E <addr> <size> :erase external data memory
L :load INTEL HEX file
I <addr> <size> :dump memory in INTEL HEX format
--------------------------------------------------------------
<addr>, <size> = 4-digit hex number.
<value> = 2-digit hex number.
Example:
In order to read a special function register, PCON, whose
address is 87H,
Type:
>S 0087
Response:
xx xx = value of PCON
1
The external memory of 8051 board may be configured as 'program
only' or 'data only' or 'program/data' according to the jumper
settings of NMI CPU board (refer to the strapping diagram of 8051
board). Therefore, the commands 'D' and 'U' are valid only for
the memory location which is configured as either 'data only' or
'program/data'. While, the commands 'P' and 'M' work only for
'program only' or 'program/data' memory.
Since 8051 does not allow a write to the program area, there is
no command to write on the program memory. In order to write on
the program memory, the jumper should be reconfigured as 'data
only' or 'program/data'.
Command 'X' loads the data pointer with <addr> and executes from
that location. The memory location which contains the program to
execute should be configured as either 'program only' or
'program/data'. If <addr> is not program memory, or the byte at
<addr> is not a valid opcode, operation is not defined and system
may need RESET.
In order to load an INTEL HEX file, type 'L', and then send the
hex file to the board. Incoming hex data is automatically loaded
at the memory location specified in the file. Be sure that the
target memory is configured as either 'program/data' or 'data
only'.
Command 'I' dumps <size> of memory beginning at <addr> in INTEL
HEX format. The default number of bytes per line is 32 (20 hex).
You may utilize the capture function in your communication
software to capture the dump and create an intel hex file.
If you have any questions regarding NMI 8051 MONITOR, please call
214-339-2204.
******************* EOF *********************
And the file EX0INT.ASM doesn't even exist.
When I sent the list of the files that I had, I sent the list of a directory different from the one where I'm working because this it's full of temp files of mine.
But, when I was trying to locate the files that you said in my directory, I realized of the problem: I was using the older version.
I apologize for all this confusion and the troubles I caused to you. Sorry.
Thank you.
RAUL GLEZ.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.