PWMPAL, is it broken or is it me?
musicmeister
Posts: 2
New to the forums but have been browsing for some time. Anyways, I bought a PWMPAL chip recently and it doesn't seem to be responding to any of the commands I send it even when copying code straight from the manual (voltage on output pins doesn't change! ). Does anyone with experience with this chip know a way to test if the chip is busted or if I have set it up wrong? Right now to test it I am sending it an "!ID" and using SERIN to see the response from the chip, but it never gets past that point. Any ideas??
Also don't know if its a problem but I am using a bs2px....I assume it uses the same baud rate as BS2SX, BS2P as in the example code....
Here is my "test code" :
{$STAMP BS2px}
' {$PBASIC 2.5}
version VAR Word
DEBUG "Start", CR
SEROUT 0, 45, [noparse][[/noparse]"!PWMSS", %00010000]
DEBUG "initial", CR
SEROUT 0, 45, [noparse][[/noparse]"!ID"]
DEBUG "Send ID"
SERIN 0, 45, [noparse][[/noparse]STR version\3] ' Never gets past this point!!
DEBUG ? version
DEBUG "Version : ", version, CLREOL
main:
SEROUT 0, 110, [noparse][[/noparse]"!PWMM1", 6, 0, 2, 0]
GOTO main
Also don't know if its a problem but I am using a bs2px....I assume it uses the same baud rate as BS2SX, BS2P as in the example code....
Here is my "test code" :
{$STAMP BS2px}
' {$PBASIC 2.5}
version VAR Word
DEBUG "Start", CR
SEROUT 0, 45, [noparse][[/noparse]"!PWMSS", %00010000]
DEBUG "initial", CR
SEROUT 0, 45, [noparse][[/noparse]"!ID"]
DEBUG "Send ID"
SERIN 0, 45, [noparse][[/noparse]STR version\3] ' Never gets past this point!!
DEBUG ? version
DEBUG "Version : ", version, CLREOL
main:
SEROUT 0, 110, [noparse][[/noparse]"!PWMM1", 6, 0, 2, 0]
GOTO main
Comments
Otherwise, the BS2 'misses' the response while you're doing your DEBUG statement.
#CASE BS2, BS2E, BS2PE
T1200 CON 813
T2400 CON 396
T4800 CON 188
T9600 CON 84
T19K2 CON 32
T38K4 CON 6
#CASE BS2SX, BS2P
T1200 CON 2063
T2400 CON 1021
T4800 CON 500
T9600 CON 240
T19K2 CON 110
T38K4 CON 45
#CASE BS2PX
T1200 CON 3313
T2400 CON 1646
T4800 CON 813
T9600 CON 396
T19K2 CON 188
T38K4 CON 84
#ENDSELECT
From the help section, looks like a change is required for baud rate.
Luckily we have a Bs2p to work with but damnit...will parallax ship replacements free? [noparse]:)[/noparse] That 8 buck shippin for an item weighing less than a pound is ridiculous
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen