Hello, I work at CTI Design House -Brazil (http://www.cti.org.br) and we develop a microcontroller based on the 8051. However, our microcontroller uses registers that are not available in 80C51 listed in the database. I'm having problems when I try to build the target, this case the following message appears "VER_I2CSM_TX_1B_NEW.asm (130): error A1: ILLEGAL CHARACTER IN NUMERIC CONSTANT" Here is the line indicated by the message.
mov 0E8, # 001h; </ pre>. Can someone show me the solution to this problem? Sincerely, Claudionor Santos
we develop a microcontroller based on the 8051.
anyhow what ARE you doing? mov 0E8, # 001h; is assembler and the error messages are from 'C' is seems like/could be that you include startup.a51 in an assembler program
Erik
it is a assembly code.
full code :
#define Result_final 0f8h ;*********** Tabela de EQU para as Variaveis em RAM VEZES EQU 8 ; conta o número de vezes de interrupçao I2C ;******************************************************************** ; ENDERECO DE DESVIO SAIDA DE RESET cseg at 0000h AJMP 200h ;******************************************************************** ; ENDERECO DE DESVIO DA INTERRUPCAO INT0 ;cseg at 0003h ;AJMP 0050h ;********************************************************************* ;******************************************************************** ; ENDERECO DE DESVIO DA INTERRUPCAO DO TIMER/COUNTER 0 ;cseg at 000Bh ;AJMP 0050h ; ENDERECO DE DESVIO DA INTERRUPCAO DO INT1 ;cseg at 0013h ;AJMP 0070h ;********************************************************************* ;********************************************************************* ; ENDERECO DE DESVIO DA INTERRUPCAO DO TIMER/COUNTER 1 ;cseg at 001Bh ;AJMP 0070h ;********************************************************************* ; ENDERECO DE DESVIO DA INTERRUPCAO DO CANAL I2CSM cseg at 02Bh ; I2CSM interruption AJMP 100h ;********************************************************************* ;********************************************************************* ; ENDERECO DE DESVIO DA INTERRUPCAO DO CANAL SERIAL ;cseg at 0023h ;serial interruption ; AJMP 0100h ;********************************************************************* ;********************************************************************* cseg at 100h MOV 0F0h, 0E8h ; MOVES STATUS REG TO ACCUMULATOR jb 0F1h, msb_interrupt ; Status Register bit 1 - E8.1 jb 0F0h, lsb_interrupt ; Status Register bit 0 - E8.0 jb 0F2h, nack_interrupt ; Status Register bit 2 - E8.2 mov R2, 0E8h cjne R2, #042h, test_lsb_interrupt ajmp msb_interrupt test_lsb_interrupt: cjne R2, #041h, test_nack_interrupt ajmp lsb_interrupt test_nack_interrupt: cjne R2, #044h, error_detected ajmp nack_interrupt error_detected: ajmp error_02 msb_interrupt: mov R0, 84h mov 0E8h, #80h ; FLAG Clear - E8 . Clear Interruption Flag inc VEZES ; Incrementa o contador de interrupçoes cjne R0, #0A2h, error_03 reti lsb_interrupt: mov R0, 85h mov 0E8h, #80h ; FLAG Clear - E8 . Clear Interruption Flag inc VEZES ; Incrementa o contador de interrupçoes cjne R0, #0F8h, error_04 setb ACC.0 reti nack_interrupt: mov R0, 84h mov 0E8h, #80h ; FLAG Clear - E8 . Clear Interruption Flag inc VEZES ; Incrementa o contador de interrupçoes cjne R0, #0F8h, error_04 setb ACC.1 reti error_02: mov 30h , R2 mov 31h , 0E8h mov Result_final, #003h ;Interrupt error error_03: mov 32h , R2 mov 33h , 0E8h mov Result_final, #003h ;Recieve error error_04: mov 34h , R2 mov 35h , 0E8h mov Result_final, #003h ;Bit 8 receive error ;********************************************************************* ; Configure 8031 ;********************************************************************* cseg at 200h SETUP_MCU: clr RS0; clr RS1; mov R0, VEZES mov A, R0 CJNE A,#0,MAIN_LOOP mov PSW, #00h ; Move o valor do reg. PSW para 00h mov IE, #0C0h ; Move o valor de C0h para IE, Habilita Interrupcao do I2CSM mov PCON, #000h mov VEZES, #001h ; inicializa o contador de interrupcoes I2C mov ACC, #000h ;********************************************************************* ; Start tranmission test ;********************************************************************* mov 0D8H, #001h ;--->>> Reg D8h não implementado I2CSM Habilitado mov 0D9h, #000h ;--->>> Reg D9h não implementado I2CSM Standard Mode D9h mov 84h, #0A2h ;I2CSM Slave Address 0xA2 , Write Mode mov 85h, #0F8h ;I2CSM Write Data 0xF8 mov R5 , 84h mov R6 , 85h mov SP, #10h MAIN_LOOP: mov R4 , 0E8h CJNE R4,#42,continue_MAIN_LOOP nop nop nop ajmp error_01 continue_MAIN_LOOP: jnb ACC.1, CHECK_I2C_LSB_INT_DONE; mov R3, VEZES ; CHECK_I2C_NACK_INTERRUPTION CJNE R3,#02,error_01 ajmp test_completed CHECK_I2C_LSB_INT_DONE: jnb ACC.0, MAIN_LOOP; mov R3, VEZES CJNE R3,#03,error_01 test_completed: mov Result_final, #001h ;Test complet sussesfuly error_01: mov 36h , R3 mov Result_final, #003h ;Bit 8 receive error END
startup.a51 included in the linking string
check the .map
thanks ,
i just could not understand when you wrote "this is ridiculous."
could you be clear ?
.