i think i will follow Ioannis idea about the programming of the motor....
also such as dave said...... stop only there are indifference in Cds value.....
this is the proramming for the LCD
TRISA = 1 'Set all PORTA pins as inputs (Cds)
TRISc = 0 'Set all PORTc pins as outputs (motor)
TRISD = 0 'Set all PORTD pins as outputs (LCD)
TRISB = 1 'Set all PORTD pins as outputs (limit switch)
start:
pot porta.0,255,v1 'Read 1st CdS Sensor (east)
pot porta.1,255,v2 'Read 2nd CdS Sensor (west)
'LCD display
Serout 1,4,[254, 1] 'Clear Screen
Pause 25
Serout portd.1,1,["Cds 1 = "] 'display Cds 1 =
Serout portd.1,1,[#v1] 'display value Cds 1
Serout 1,1,[254,192] 'Move cursor to first position on second line
Pause 5
Serout portd.2,1,["Cds 2 = "] 'display Cds 2 =
Serout portd.2,1,[#v2] 'display value Cds 1
Pause 100 'display the Cds value for a little time
my problems is there are 4 output for the lcd so i dont know where to put this programming that only have two output.....?
detail lcd
16 x 2 characters LCD display
With yellow backlight
Built in controller (HD44780 or equivalent)
http://www.cytron.com.my/usr_attachm..._Schematic.pdf




Bookmarks