Shop OBEX P1 Docs P2 Docs Learn Events
SimpleDebug and 'high end' ASCII characters — Parallax Forums

SimpleDebug and 'high end' ASCII characters

HughHugh Posts: 362
edited 2013-02-24 17:44 in Propeller 1
Hi,

My code is:
OBJ
DEBUG           : "SimpleDebug"


PUB Main 


DEBUG.Start(2400)
  repeat 
    
    debug.putc(48)

Serial Terminal shows the 'dagger' (obelisk) glyph.
Sending 49 is the same
Sending 50 results in a hyphen, as does 51
Sending 52 results in a 'double exclamation' glyph.

It is the same on either of two protoboards.

Any suggestions, please? Have I reset a font, or something else?

I have downloaded the SimpleDebug object and installed Serial Terminal again, but to no change.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-02-20 12:09
    SimpleDebug is just a "wrapper" for FullDuplexSerial. It takes care of some of the details of starting up FullDuplexSerial and it adds some conversion routines for displaying values as decimal, hex, and binary numbers. The .putc routine simply transmits the byte given. 48 is "0", 49 is "1", 50 is "2", and 52 is "4". These don't require any special font. The problem you're seeing is probably that your terminal program is set for the wrong Baud. It needs to be configured for the same Baud that you supply on the .start call, 2400 Baud in the case you've shown.
  • AribaAriba Posts: 2,690
    edited 2013-02-20 12:16
    You need to define the crystal freq. and PLL faktor, otherwise the Propeller runs from internal RC oscillator which is not precise enough for serial communication:
    CON
      _clkmode  = xtal1 + pll16x
      _xinfreq  = 5_000_000
    

    Andy
  • HughHugh Posts: 362
    edited 2013-02-20 12:21
    Thanks Mike,

    It is the same irrespective of [matched] baud rate.

    I think I'll try a different PC...
  • HughHugh Posts: 362
    edited 2013-02-20 13:00
    Thanks Andy. If I include the clock info nothing at all appears (on either board).

    Plugging in a third board via a Prop Plug (the other two are USB) and everything worked OK. Going back to the first two boards (on different COM ports) and nothing...
  • AribaAriba Posts: 2,690
    edited 2013-02-20 13:10
    Which boards do you use?
  • HughHugh Posts: 362
    edited 2013-02-21 00:31
    I have tried it on three boards, Andy:

    Demoboard - does not work (as above)
    USB Protoboard - does not work (as above)
    Protoboard with PropPlug - works perfectly.

    (I've re-installed the FTDI drivers, just in case)
  • HughHugh Posts: 362
    edited 2013-02-23 14:06
    Arghhh. Yet another board appears to have started doing this, with no change to the content of the EEPROM. An LED that comes on after every tranche of data comes on more less frequently and all of the data appears stuffed. :-(
  • Mike GreenMike Green Posts: 23,101
    edited 2013-02-23 14:21
    What you're describing doesn't make sense. The clock statements in Post #3 are necessary for any serial communications (so there's an accurate timebase). Could there be something wrong with the USB cable?
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2013-02-24 17:44
    Although you can run serial communications at the lower baud rates without setting clock and pll it is advisable to get into the habit of adding those lines of code.

    Is it possible you are connecting PST and adjusting the baud rate while connected.

    Set up your port # and baud rate (stick with 2400 for now) in PST then cycle power or reset the Prop to see if it starts to display what you expect.

    Jeff T.
Sign In or Register to comment.