More infor on ColorPal sensor
Hi, thanks for your advice. I admit to being way out of my depth. I put in the code to wait till the pin was high before proceeding but that just hung because the colorpal does pull the signal line high but if it is attached to an input pin its goes low (don't know why), anyway I know that is not the issue because just putting a wait in the begining works just fine and I know the pin is high before I issue a serial command and also the colorpal does what is told and turns the RED LED on.
This is the code I used:
'BASIC converted from Logicator for PICAXE flowsheet:
'C:\Users\Tony\Documents\colorpal.plf
'Converted on 6/3/2012 at 11:10:54
symbol varA = b0
symbol varB = b1
symbol varC = b2
let dirsB = %11111111
main:
label_5: pause 50 'Wait command
'hold:
'If pinC.6 = 0 then hold
output C.6
serout C.6,T2400_4,("= R s !")
input C.6
serin[10], C.6,T2400_4,varA,varB,varC
debug
goto label_5
#no_data 'reduce download time
I have almost no experience interpreting the oscilloscope and no formal training in electronics. This is the trace I got on the colorpal serial pin.
If I just tell the colorpal to turn the red on and not to send a "sample" back I got this trace.
I think they are the same meaning there is no serial data coming back to the pic? I know the manual said the pin should be configured as an input except when being driven low and I know from playing around and watching the trace that as soon as I put the signal line from the colorpal onto the pic pin it sucks it low? It seems logical that the serial line being pulled low is preventing the reception of the serial data into the pic? I am clutching at straws in the dark really. If anybody wants me to psychically post them one of these things I have a box of them that I can't get to work. If another teacher wants the dozen colorpals I have you can have them for free (unless I can get it going with 1 more hours effort). If it is something obvious let me know otherwise I will probably need to move on to another sensor.
Thanking you for any assistance rendered.