SEROUT,HSEROUT or DEBUG ? max 232 or no max232 ?


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Try
    N2400
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Dennis,

    Have you read this?
    Communications Example : PC to PIC bi-directional dialogue

    Thanks to Melanie! This helped me a lot when I did code, which communicated with PC.


    BR,
    -Gusse-

    Edit 1: I have used baud rate up to 38400 very successful. It might work even higher data rate (haven't try so far).
    Edit 2: Running on 16F876A with 10MHz crystal, haven't tested with PIC that has internal oscillator. 1k5 resistors between PC and PIC (TX & RX).
    Last edited by Gusse; - 21st November 2009 at 20:23.

  3. #3


    Did you find this post helpful? Yes | No

    Default Thanks Gusse

    Will definitely check it out and do the suggested tests :-)
    Thank you

  4. #4


    Did you find this post helpful? Yes | No

    Default Thanks Dave

    Have tried N2400 ... no luck :-(
    Correct me if I'm wrong but surely is well if the string arrives correctly ?

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    DEFINE LCD_RWREG 0 'defines the port where R/W line is connected to (set to 0 if not used)
    DEFINE LCD_RWBIT 0 'defines the pin where R/W line is connected to (set to 0 if not used)
    I don't think it's a good idea to set those to 0.
    It will end up overwriting bit0 at address 0 in RAM which is normally PBP's R0 system variable.

    Try it without those lines.

    hth,
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default Darrel ....YOU are the man !

    Darrel ....
    10 points on spotting this issue ... dude can I borrow those 'fine-tooth comb code-eyes' ???

    So I removed the lines...
    and here are the results .....
    1. LCD response is a million times faster.
    2. Keypresses happen almost instantly now
    3. The LCD was not responding to
    Code:
    lcdout $fe,1          'clear lcd screen
    Now it responds like it should ...each keypress displays correctly, no funny wingdings like characters :-)
    and ... the LCD display clears after every keypress :-)
    YAY
    The LCD and keypress system is working like it should WOOOHOOOOO !!

    Thanks a million
    :-)

    Kind regards
    Dennis

    PS... I still want to know how you noticed that ?? Past experiences ?

    Now all that remains is solving my SEROUT variable passing issue so I can see proper characters in hyperterminal :-)
    I keep getting a little square in hyperterminal as the keypress occurs but on the LCD it appears correct :-(

    the key pressed isthe key pressed isthe key pressed is
    Last edited by Dennis; - 22nd November 2009 at 00:04.

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dennis View Post
    Have tried N2400 ... no luck :-(
    Correct me if I'm wrong but surely is well if the string arrives correctly ?
    Now all that remains is solving my serout variable passing issue so I can see proper characters in hyperterminal :-)
    now I am confused....
    Dave
    Always wear safety glasses while programming.

  8. #8


    Did you find this post helpful? Yes | No

    Default smoke and mirrors?

    At least I'm not alone then :-)

    I'm sure it has to do with passing the variable 'cos a 'string like this' appears just fine !

    And if I LCDOUT myvar that works fine on the LCD

    What doesn't work fine is when I SEROUT the variable myvar and try read it in hyperterminal

    WEIRD or what ?

    In fact with SEROUT using N2400 the output is worse and even the string of text is wingings :-)
    See next post here for the output screenshot... this tells me that T2400 is correct !
    Last edited by Dennis; - 22nd November 2009 at 00:25.

  9. #9


    Did you find this post helpful? Yes | No

    Default Here's a screen cap of the hyperterminal output

    See the Received window
    Attached Images Attached Images  

  10. #10
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    WOOHOO!

    dude can I borrow those 'fine-tooth comb code-eyes' ???
    Well, I do have 4 eyes, so I guess you can have a couple of them.
    Need a new pair of specs anyhow.

    For the SEROUT prob...
    Steve's keypad routine returns a result that represents the number of the key. For a 4x4 pad it's 1-16.

    With a LOOKUP statement you can change them to match your keypad ...
    Code:
    LOOKUP  myvar,[0,"123A456B789C*0#D"],myvar
    hthm,
    DT

Similar Threads

  1. N-Bit_MATH
    By Darrel Taylor in forum Code Examples
    Replies: 38
    Last Post: - 16th December 2010, 14:48
  2. Wireless using debug.
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th January 2010, 14:53
  3. About USB
    By dias11 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 3rd December 2009, 20:41
  4. debug not working with MPASM assempler
    By santamaria in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th March 2009, 07:51
  5. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46

Members who have read this thread : 3

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts