Shop OBEX P1 Docs P2 Docs Learn Events
Serial Communication Problems with PINK Module — Parallax Forums

Serial Communication Problems with PINK Module

brsbrs Posts: 33
edited 2008-04-10 03:09 in BASIC Stamp
Hello,

I recently dusted off an old PINK web server to use with a BS2. The PINK board is labeled as an SB70 v1.2 and the BS2 is just plugged into a Homework REVC board for testing purposes. I'm also using a standard wall wart as the PINK is a little piggish on power consumption. I'm trying to understand when I run a slightly modified version of the PINkTestV1.0.bs2 (available from the PINK's website) program, why don't the correct values show up when displaying them trough the "Modify Variables" web link, i.e. (http://XXX.XXX.X.X/VV_Show.htm).

For example, I run the test program from the BS2 that sends various byte values (0,85,170,255) to several of the general purpose flash and RAM memory locations on the PINK. The script then attempts to read the values from each memory location hoping they match what was just previously written, ... and they apparently do; as the test program passes with flying colors.

But when you check the values by opening a web browser and selecting the "Modify Variables" link, the values appear as gibberish. For example, all of the "Nb_varXX=" (where XX is a number from 00 to 99) contain the value [noparse][[/noparse]ÿ] instead of the last written value from the BS2 program of 255.

Any ideas on what could be causing this?

On a side note, the PINKWriteVariable.bs2 and PINKReadVariable.bs2 don't appear to be working as the PINKReadVariable.bs2 program fails by timing out when attempting to read a value from a memory location.

Thanks,
Bryce

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-06 18:42
    Do you have a common ground connection? What's the Baud setting of the PINK? If either is not right, you could get the behaviour you're describing.
  • brsbrs Posts: 33
    edited 2008-04-06 20:12
    Yepper! Pin one of the PINK is plugged into the Vss strip on the BOE. Using the web interface the serial port data settings are: 2400, 8, N, 1.
  • MSDTechMSDTech Posts: 342
    edited 2008-04-06 20:56
    You need to format the variables with the BS2 in order for them to display correctly.
    For example, to display the date and hour from a DS1302, which uses a binary coded decimal and is formatted with hex2, in variable 26 you would use:
    SEROUT pink_rx, PinkBaud,[noparse][[/noparse]"!NB0W26:"," ", HEX2 month, "/", HEX2 date, "/", HEX2 year, " ",HEX2 hrs ,":", HEX2 mins,CLS]
    To have your variable display 255, use:
    SEROUT pink_rx, PinkBaud, [noparse][[/noparse]"!NB0W##:",dec 255, cls]
    Also, don't forget to end each communications with CLS. This tells the Pink you are finished and it should update the variable.
  • Chris CChris C Posts: 50
    edited 2008-04-07 22:01
    What's a wall wart for the PINK?

    Also, can I splice into the power and ground on a USB port to power it?
  • brsbrs Posts: 33
    edited 2008-04-08 12:40
    The wall wart is not plugged into or connected to the PINK board. The wall wart is plugged into the Board of Education (BOE) board, and via jumper wires, the PINK board is connected to the Vdd and Vss sockets on the BOE.
  • Chris CChris C Posts: 50
    edited 2008-04-10 03:09
    I actually decided to splice a USB connector into the VDD and GND of the PINK and it works great!
Sign In or Register to comment.