Shop OBEX P1 Docs P2 Docs Learn Events
Using Serout/Serin to Network many SX48s — Parallax Forums

Using Serout/Serin to Network many SX48s

John BondJohn Bond Posts: 369
edited 2006-07-28 07:24 in General Discussion
Hi guys

Please can you assist

The proposal is to switch·several·dozen·LEDs to identify the steps in an assembly process.·Between·one and five LEDs light up at each step of the process. As that step of the operation is complete, you hit a button and the next·selection of LEDs light up.·Up to 100 LEDs are involved. The LEDs are spread over an area of about 8 foot by 6 foot.

I propose using·a BS2p to control·between one·and six SX48 development boards. The BS2p looks up the assembly sequence for·the selected·product and·writes·four ascii characters to·one coms cable. The four·character string is Char255 (Start Byte),·an·address to select·which·SX48·board, a port address·for that board and char between 0 and 255 to switch·the LED pattern on that port. (So I'm using the SX48 as an addressable 32 line "shift register"). After switching the LEDs, the SX48 returns a confirmation string on a second coms line·to ensure that the LED pattern was correct.

Question 1
Can I use several SX48s·returning a confirmation string to the BS2p·on·one line·using the SX/B command Serout·and a resistor to pull the line high (as·you can do·between several Stamps). The traffic on this line will only be a couple of characters a minute and there should never be conflict but I would like to be sure that if two sx48 try to talk at the same time, they don't blow each other's output pins.

Question 2
What sort of length of cable can·I expect to get·reliable coms on·at T9600 buad·or T2800 baud just using the 5V-0 signal. There is no electrical equipment close by other that 220V fluorescent lighting. I want to try to avoid using an RS232 driver ic.

Kind regards from the African veld


John Bond

Post Edited (John Bond) : 7/27/2006 9:15:31 AM GMT

Comments

  • BeanBean Posts: 8,129
    edited 2006-07-27 14:02
    I was going to say the the SX48 protoboards are mega overkill, but at $10 each I guess not.

    Question 1
    If you put 220 ohms resistors on the SX48 pins before they are tied together, that should protect them.

    Question 2
    If you enable the schmitt trigger for the serial input pins you should be able to tolerate quite a bit of noise.
    If the cable run is really long try lowering the baud rate, or lower the pull-up resistor value.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "The meaning of life, is to give life meaning" Unknown.
    ·
  • John BondJohn Bond Posts: 369
    edited 2006-07-28 07:24
    Thanks a stack Bean

    You're right about the SX48 being overkill... I only use a couple of dozen lines of code and seven variables in each. But compared to the existing Japanese Machine that uses a big Mitsubishi FX PLC and plenty of add-on relay blocks, it costs pennies. Also, I’m just going to use ULN2803s and if someone shorts a card, we throw it away. SARand 90.00 for an SX48 board is 2 dozen cans of that great South African Beer we call Castle Larger (The guys who make Castle also own Millers in the USA but I’m told that is a sh@# drink.)

    Also, skills are short here. The ladies who work out the assembly sequence and method can do the whole thing in an Excel spreadsheet and Copy/Paste it into BS2p Program. You can’t do that with Melsec (Mitsubishi programming language). The phrase is "Fit for purpose"

    Kind Regards from Kwa Dukuza

    John Bond
Sign In or Register to comment.