BS2px and PIN 7
Mike G
Posts: 2,702
Is there anything special about PIN 7 on the BS2px?·
If I change the PIN declaration below to "PSC PIN 7"·the code fails however every other PIN (0-6, 8-15)·works perfectly.· I tested the code on a BS2 and every PIN works as expected.
Thanks,
Mike
Post Edited (Mike Gebhard) : 11/5/2006 5:35:25 PM GMT
If I change the PIN declaration below to "PSC PIN 7"·the code fails however every other PIN (0-6, 8-15)·works perfectly.· I tested the code on a BS2 and every PIN works as expected.
' {$STAMP BS2} ' {$PBASIC 2.5} ' Set baud for all STAMP versions #SELECT $STAMP #CASE BS2SX, BS2P N2400 CON 1021 + $8000 N38K4 CON 45 + $8000 #CASE BS2PX N2400 CON 1646 + $8000 N38K4 CON 84 + $8000 #CASE #ELSE N2400 CON 396 + $8000 N38K4 CON 6 + $8000 #ENDSELECT PSC PIN 15 ' PSC I/O Pin buff VAR Byte(3) ' Temporary variable Main: DEBUG CR,"----------------------------",CR GOSUB Get_PSC_Settings ' Check PSC Baud and Version DEBUG CR,"----------------------------",CR STOP '------------------------------------------------------------------------- Get_PSC_Settings: DEBUG "Getting PSC Information", CR SEROUT PSC, N2400, [noparse][[/noparse]"!SCVER?",CR] SERIN PSC, N2400, 500, Try_38K4,[noparse][[/noparse]STR buff\3] DEBUG "Baud = 2400", CR, "PSC ver: ", buff(0), buff(1), DEC buff(2) GOTO N2400_Found Try_38K4: SEROUT PSC, N38K4, [noparse][[/noparse]"!SCVER?",CR] SERIN PSC, N38K4, 500, Baud_Exception,[noparse][[/noparse]STR buff\3] DEBUG "Baud = 38K4", CR, "PSC ver: ", buff(0), buff(1), DEC buff(2), CR N2400_Found: RETURN '------------------------------------------------------------------------- Baud_Exception: DEBUG "Failed", CR RETURN
Thanks,
Mike
Post Edited (Mike Gebhard) : 11/5/2006 5:35:25 PM GMT
Comments
·
·· There is nothing special about P7 on the BS2px.· Is it possible you have damaged the pin somehow?· What board are you using?· Is it possible something on the board is also connected to that pin on the module?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I'm using a BOE and no external circuits. You're right I guess PIN 7 must be damaged. I wired up a simple LED circuit and all pins but PIN 7 function. I'm not sure when the damage occurred. I rarely use the BS2px.