Shop OBEX P1 Docs P2 Docs Learn Events
oled to basic stamp 2 communication — Parallax Forums

oled to basic stamp 2 communication

science_geekscience_geek Posts: 247
edited 2008-04-30 22:26 in BASIC Stamp
i recently bought a oled display from 4d systems, and i wrote a code that would show a slider bar and when you touched it, it would show a value. i then had it send out a serout command of that value, but when the basic stamp gets it i have it debug it and i get really odd shapes, if i convert it to decimal i get crazy numbers not even close to the original. numbers like 9540 when the highest i will ever send from the display is 240, is this a communication error or a timing error or what? any suggestions will help

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-04-30 02:20
    Hard to tell without your code. Probably your "BaudMode" constant is not correct.

    You do realize that the BS2 does not "buffer" serial communications at all, right? Meaning, unless the BS2 is 'waiting' in a SERIN statement when data starts on the serial line, it will miss some of it.

    Also, you MUST run a 'common ground' between the device and the BS2 if it is going to accurately read the serial signal.
  • science_geekscience_geek Posts: 247
    edited 2008-04-30 13:29
    i didnt know that it had to have a common ground, but im getting power right off the board with the vdd and the vss going directly to the screen to power it and then a seperate wire going from the output of the screen to the input of the stamp, when i get home i will post both codes
  • AmaralAmaral Posts: 176
    edited 2008-04-30 13:38
    If you are supplying you display from the Board of Education (BOE) than you already have the ground connected together !

    Check if you are sending LSB or MSB from the display to the stamp.


    Amaral
  • science_geekscience_geek Posts: 247
    edited 2008-04-30 18:16
    ok, now i sound stupid, but what is lsb and msb
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-04-30 20:26
    LSB == Least Significant Bit first, MSB == Most Significant Bit First. I didn't know it was selectable. Default RS-232 is MSB first, I believe.
  • AmaralAmaral Posts: 176
    edited 2008-04-30 20:43
    Yeap , it is not selectble ! sorry about it ! it does not matter in assinc comm.

    have you checkt the baud rate ?
  • science_geekscience_geek Posts: 247
    edited 2008-04-30 22:26
    baud rates on both are the same, could it be that it the screen sends the data to soon and the stamp doesnt catch it all
Sign In or Register to comment.