Serial Communication Problems with PINK Module
brs
Posts: 33
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
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
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.
Also, can I splice into the power and ground on a USB port to power it?