by criadobot » Wed Feb 06, 2008 4:12 pm
by criadobot
Wed Feb 06, 2008 4:12 pm
Hello group, I have recently acquired RM-16202 serial module, not well versed in the instructions and syntax, I encourage testing, looking at the instructions in the manual R1, not well versed in the syntax, I had several mistakes compilation, but one of the attempts to step program microcontroller, and it hung am, I am not allowed to get new programs, after a long time trying to get a new program, the microcontroller, and finally got to be stable, I went back to get another program without using the LCD and all good, until proseguí with the program that I wanted to do to see on the screen LCD value of the position of a servo and again has been left hanging the microcontroller, or the LCD.
The program was something so naive as this.
'== Engine diretion setting ======================
DIR G6A, 1,0,0,1,0,0
DIR G6B, 1,1,1,1,1,1
DIR G6C, 0,0,0,0,0,0
DIR G6D, 0,1,1,0,1,0
'== Engine start position read ===================
GETMOTORSET G6A, 1,1,1,1,1,0
GETMOTORSET G6B, 1,1,1,0,0,0
GETMOTORSET G6C, 1,1,1,0,0,0
GETMOTORSET G6D, 1,1,1,1,1,0
5 SPEED
'== Engine power on =============================
MOTOR G24
MOTOROFF G24
A DIM AS INTEGER
DIM B AS INTEGER
========= This part of the top header I always like to initialize the servos .===
LCDINIT inicializo the LCD
CSON shows the cursor
CONT contrast 20
MOTOR 13 define the Serbo I will use
SERVO 13.63 him to command a pulse Serbo 13
A = AIMOTORIN (13) read the position of the servo and keep it in A
LOCATE 0.1 cursor position
PRINT "A" print A
DELAY 5000 break
CLS clears screen
Start:
A = AIMOTORIN (13) read the position of the servo and keep it in A
LOCATE 0.1 cursor position
PRINT "A" print A
DELAY 5000 break
CLS clears screen
GOTO start
The only possible cause, I think it might be that the compiler, he passed a mistake, and it happens to micro and leave it hanging, did any suggestions on how to use an LCD display? Speak.
Hello group, I have recently acquired RM-16202 serial module, not well versed in the instructions and syntax, I encourage testing, looking at the instructions in the manual R1, not well versed in the syntax, I had several mistakes compilation, but one of the attempts to step program microcontroller, and it hung am, I am not allowed to get new programs, after a long time trying to get a new program, the microcontroller, and finally got to be stable, I went back to get another program without using the LCD and all good, until proseguí with the program that I wanted to do to see on the screen LCD value of the position of a servo and again has been left hanging the microcontroller, or the LCD.
The program was something so naive as this.
'== Engine diretion setting ======================
DIR G6A, 1,0,0,1,0,0
DIR G6B, 1,1,1,1,1,1
DIR G6C, 0,0,0,0,0,0
DIR G6D, 0,1,1,0,1,0
'== Engine start position read ===================
GETMOTORSET G6A, 1,1,1,1,1,0
GETMOTORSET G6B, 1,1,1,0,0,0
GETMOTORSET G6C, 1,1,1,0,0,0
GETMOTORSET G6D, 1,1,1,1,1,0
5 SPEED
'== Engine power on =============================
MOTOR G24
MOTOROFF G24
A DIM AS INTEGER
DIM B AS INTEGER
========= This part of the top header I always like to initialize the servos .===
LCDINIT inicializo the LCD
CSON shows the cursor
CONT contrast 20
MOTOR 13 define the Serbo I will use
SERVO 13.63 him to command a pulse Serbo 13
A = AIMOTORIN (13) read the position of the servo and keep it in A
LOCATE 0.1 cursor position
PRINT "A" print A
DELAY 5000 break
CLS clears screen
Start:
A = AIMOTORIN (13) read the position of the servo and keep it in A
LOCATE 0.1 cursor position
PRINT "A" print A
DELAY 5000 break
CLS clears screen
GOTO start
The only possible cause, I think it might be that the compiler, he passed a mistake, and it happens to micro and leave it hanging, did any suggestions on how to use an LCD display? Speak.