serial lcd with 16f628


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try this and see what happens;
    Code:
    @ DEVICE MCLR_OFF, HS_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON
    
    DEFINE OSC 10
    
    CMCON = 7
    
    Pause 2000
    
    start:
    
    SerOut2 PORTA.3, 17197,["N1200"]
    Pause 2000
    SerOut2 PORTA.3, 16780,["N2400"]
    Pause 2000
    SerOut2 PORTA.3, 16468,["N9600"]
    Pause 2000
    SerOut2 PORTA.3, 16416,["N19200"]
    Pause 2000
    
    SerOut2 PORTA.3, 813,["T1200"]
    Pause 2000
    SerOut2 PORTA.3, 396,["T2400"]
    Pause 2000
    SerOut2 PORTA.3, 84,["T9600"]
    Pause 2000
    SerOut2 PORTA.3, 32,["T19200"]
    Pause 2000
    
    GoTo start
    End
    Do any of these print as expected?

    Try using a different port pin and see what happens.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    thanks bruce.. i wish i had thought of that... as soon as i saw the code you wrote, it just kinda clicked that i should have done it 2 days ago... so it works with t19200 so i needed to use "32"... so i put that # back into my original code, and it displays the "hello world" multiple times..

    with my code, it repeats itself every 2 seconds, so the first time it display the "hello world" the hello is all messed up, and it displays world fine... then the second cycle it displays everything fine... so the display looks like

    B PPx world hello w
    orld hello world hel
    lo world hello world

    @ DEVICE HS_OSC
    DEFINE OSC 10
    cmcon = 7
    TRISA = %00000000
    TRISB = %00001000

    lcd VAR PORTA.3
    baud CON 32

    Pause 2000

    start:

    SerOut2 lcd, baud,[" Hello World"]
    Pause 2000
    GoTo start
    End


    thanks for all your help.. i think im finally learning a bit!!!
    danny

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 08:28
  2. LCD serial backpacks
    By Archangel in forum Serial
    Replies: 67
    Last Post: - 30th December 2010, 04:51
  3. Please help with EDE702 - Serial to LCD interface
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th October 2008, 02:48
  4. Serial LCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2007, 08:31
  5. Gps with 16f628
    By dragons_fire in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th June 2006, 03:38

Members who have read this thread : 0

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