Shop OBEX P1 Docs P2 Docs Learn Events
PWMPAL, is it broken or is it me? — Parallax Forums

PWMPAL, is it broken or is it me?

musicmeistermusicmeister Posts: 2
edited 2008-03-09 15:41 in BASIC Stamp
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! confused.gif). 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

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-03-09 03:21
    Yeah, the BS2 is 'single tasking'. When you do the "SEROUT ... !ID" -- you should then IMMEDIATELY do the SERIN.
    Otherwise, the BS2 'misses' the response while you're doing your DEBUG statement.
  • kelvin jameskelvin james Posts: 531
    edited 2008-03-09 06:01
    #SELECT $STAMP
    #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.
  • musicmeistermusicmeister Posts: 2
    edited 2008-03-09 06:41
    Ah it WAS the baudrate, that fixed it right up thanks a lot!! Wish I had known that five hours ago....unfortunately in testing we busted the pins off the PWMPAL stamp and then when re-soldering those flimsy pins we somehow burnt out the Bs2px? Son of a......mad.gif

    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
  • FranklinFranklin Posts: 4,747
    edited 2008-03-09 15:41
    That's shipping AND handling. You wouldn't want them to just throw that in an envelope and mail it would you? [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.