Shop OBEX P1 Docs P2 Docs Learn Events
How to HIGH multi pins at once? And communication error 240 or 40 questions — Parallax Forums

How to HIGH multi pins at once? And communication error 240 or 40 questions

SashaSasha Posts: 35
edited 2007-12-08 20:22 in General Discussion
In PBasic I do this to fire multi pins at once on· BS2:
DIRL = %11111111
Main:
DO
· GOSUB a
· PAUSE 500
· GOSUB b
· PAUSE 500
· GOSUB c
· PAUSE 500
LOOP
A:
·OUTL = %11111110
·OUTL = %11111100
·OUTL = %11111000
·OUTL = %111110000
RTURN
ETC..

How to do this·with SX/B (from RC.0....RC.7)?

Second question is that when I connect SX Tech to the Notebook· through Usb to Serial adapter (SX Key) after Erasing message, start programming and after few seconds appear new message with warning - communication error 240 0r 40 smhair.gif On the old notebook PIII with serial comm I haven't this problem. Anybody knows why?
THANKS!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Think deep......Dive shallow !!!
·

Comments

  • BeanBean Posts: 8,129
    edited 2007-12-08 19:41
    You can use:
    ·
    · HIGH RC

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com



    Post Edited (Bean (Hitt Consulting)) : 12/8/2007 7:52:46 PM GMT
  • SashaSasha Posts: 35
    edited 2007-12-08 19:47
    Tnaks Bean,

    but what I want is something like

    HIGH RC.0··LOW RC.1 HIGH RC.2,

    not to HIGH all pins or LOW all pins. Can you help me?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Think deep......Dive shallow !!!
    ·
  • BeanBean Posts: 8,129
    edited 2007-12-08 19:49
    Just set RC to the value you want.

    Like "RC = %10101010" if the all the pins are not set for output then use "OUTPUT RC" first.

    P.S. You can also use "HIGH RC" or "LOW RC" to set the pins to output and set the state (high or low).

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • SashaSasha Posts: 35
    edited 2007-12-08 19:53
    Thanks man,

    That is wery simply, but I can't find it in manual. Do you now whay recive error message during programming SX chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Think deep......Dive shallow !!!
    ·
  • BeanBean Posts: 8,129
    edited 2007-12-08 20:06
    First of all, what USB to Serial adapter are you using ?
    Is the computer XP, Vista, other ?

    There are some setting in the Device Manager that you can change that may fix it, I don't remember what they are off-hand. Maybe someone else can chime in if they know.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • SashaSasha Posts: 35
    edited 2007-12-08 20:22
    With Serial adapter that I using work fine with BS1 & BS2. Computer OS is XP.

    Thank you

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Think deep......Dive shallow !!!
    ·
Sign In or Register to comment.