ColorPAL Troubles
John Board
Posts: 371
Hi Y'all,
I've just had an exciting box in the post... with *Most* my ordered parts in them, however, after much enjoyment with the 4x16 LCD and a bit of playing around with the other stuff, I came to the ColorPAL which doesn't want to co-op.
Can anyone help me, I'm using the BOE with the bs2px, the sensor is plugged directly into the solderless breadboard. I have tried all the sample code, but none seems to work... Please Help!
Thanks in advance,
P.S. I am using relavly fresh batts, so it isn't them
John
I've just had an exciting box in the post... with *Most* my ordered parts in them, however, after much enjoyment with the 4x16 LCD and a bit of playing around with the other stuff, I came to the ColorPAL which doesn't want to co-op.
Can anyone help me, I'm using the BOE with the bs2px, the sensor is plugged directly into the solderless breadboard. I have tried all the sample code, but none seems to work... Please Help!
' ========================================================================= ' ' File...... ColorPAL_transit.bs2 ' Purpose... ColorPAL smooth transition demo. ' Author.... Phil Pilgrim -- Bueno Systems, Inc. ' E-mail.... propeller@phipi.com ' Started... 17 Apr 2009 ' Updated... 26 Jan 2010: Changed reset delay from 50 ms. to 80ms. ' ' {$STAMP BS2px} ' {$PBASIC 2.5} ' ' ========================================================================= ' -----[ Program Description ]--------------------------------------------- ' This program programs the ColorPAL to transition red->green->blue->red ' in a continuous loop. It does not program the ColorPAL's EEPROM. ' -----[ I/O Definitions ]------------------------------------------------- sio PIN 15 ' Serial I/O com pin for ColorPAL. ' -----[ Constants ]------------------------------------------------------- ' Baudrate definitions. Serial I/O must be open-drain. The ColorPAL includes ' a pullup internally. #SELECT $STAMP #CASE BS2, BS2E, BS2PE baud CON 119 + 32768 #CASE BS2SX, BS2P baud CON 327 + 32768 #CASE BS2PX baud CON 536 + 32768 #ENDSELECT ' -----[ Variables ]------------------------------------------------------- red VAR Word ' Received RGB values from ColorPAL. grn VAR Word blu VAR Word ' -----[ Initialization ]-------------------------------------------------- GOSUB Reset ' Reset the ColorPAL and enter direct command mode. ' -----[ Program Code ]---------------------------------------------------- SEROUT sio, baud, ["= t20 (00 R G B ) !"] DO:LOOP ' -----[ Subroutines ]----------------------------------------------------- ' Reset: Sends a long break to reset ColorPAL and enter direct command mode. Reset: LOW sio 'Pull sio low to eliminate any residual charge. INPUT sio 'Return pin to input. DO UNTIL sio : LOOP 'Wait for pin to be pulled high by ColorPAL. LOW sio 'Pull pin low. PAUSE 80 'Keep low for 80ms to enter Direct mode. INPUT sio 'Return pin to input. PAUSE 10 'Pause another 10ms RETURN
Thanks in advance,
P.S. I am using relavly fresh batts, so it isn't them
John
Comments
We need more details:
1. Please give an example of a sample program that you tried and what results you got from it.
2. Also provide details about how the ColorPAL was connected to your BS2px.
3. Did you see the LED light up when the ColorPAL was given the sample instruction?
-Phil
VDD is connected to... well... VDD...
VSS is connected to GND
SIG is connected to P15
Here is the sample code as per the ColorPAL_transit example code:
And the result... Zip, Nadda, Nothing, no blips, flashes, or bits of datum in the "Console" (Debug window).
Thanks for responding,
John
Thanks,
-Phil
-Phil
Never the less, it made me jump at the thought of not including the sub's return statement....
Sorry for the trouble,
-Phil
I don't have a BS2px, but I tried the program you posted with a BS2 and a BS2p, and it works with both of those. I also double-checked the BS2px baud rate constant against the manual, and it's correct for 7200 baud. Are you absolutely sure that you've connected the ColorPAL properly and do not have the plug reversed? Also make doubly sure that the power jumper for P12-P15 is set for Vdd and not Vin, and that the BOE's three-position power switch is set all the way to the right.
-Phil
Thanks for your help anyway
Do you have a BASIC Stamp other than the BS2px that you could try it with?
-Phil
I just tried your program with my newly-arrived BS2px, and it works just fine.
-Phil