Shop OBEX P1 Docs P2 Docs Learn Events
Colorpal 28380 — Parallax Forums

Colorpal 28380

emilienemilien Posts: 4
edited 2011-07-27 00:13 in Accessories
hello
I try to communicate with the colorpal sensor to recuperate the red color part of the subject. When I do this I have 32 bits in response instead of 12 bits like it's indicated in the datasheet. I agree there are the Start bit(low level) and the stop bit (high level) but what is the correspondance ofothers bits and what is the order of bit in the return plot. I search oninternet and I found no response. Please someone could help me.
Thanks in advance.
Best regards

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-07-25 10:55
    emilien,

    Welcome to the forum!

    The ColorPAL returns data for the color sensor as three hexadecimal characters, each with its own start and stop bits. See page 9 of the ColorPAL manual for details.

    -Phil
  • emilienemilien Posts: 4
    edited 2011-07-25 23:37
    Hello
    Thanks for your response but I am aware that the Colorpal send three hex digit per color. However three hex digit match 4*3 so 12 bits and on the oscilloscope I watch 32 bits. Even if I count the start and stop bit, I have never found the meaning of all bits.

    Phil you said that the sensor send three hex digit and each has their start and stop bit. Maybe you would said that the sensor send 8bit per hex digit with their start and stop bit. that's mean that 30 bits are use for the digit((8+2)*3). If it's correct it stay only 2bits without explanation except if my oscilloscope reading is wrong.

    thanks in advance for all help.
    Best regards
    Emilien
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-07-26 00:03
    The hex digits are sent in 8-bit ASCII: 1 start bit, 8 data bits, 2 stop bits per each. Three characters make 33 bits total.

    -Phil
  • emilienemilien Posts: 4
    edited 2011-07-26 00:59
    It was that i though but thank you so much for your help. I will make one last message with graph if someone have the same probleme.
    Emilien
  • emilienemilien Posts: 4
    edited 2011-07-27 00:13
    Hello
    You can watch behind the colorpal plot if someone have the same problem as me.

    colorpal_plot.jpg


    Thank you to phil for helps.
    Best regard
    Emilien
    1024 x 298 - 35K
Sign In or Register to comment.