Serial LCD display for PIC projects ?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: Serial LCD display for PIC projects ?

    Here is the simple code:

    ' ************************************************** ************************
    ' Programme: Test SEROUT.PBP
    ' RGL 02-2022
    ' Testing AXE134 (Picaxe 4x20# OLED Display) ---> PIC 16F630
    ' PicBasicPro Compiler V:2.40
    ' ************************************************** ************************


    Include "modedefs.bas"

    ' Pic Specifications
    '--------------------
    'PIC16F630 with 16Mhz resonator
    @ Device Pic16F630,HS_OSC, WDT_OFF, PWRT_ON, PROTECT_OFF, MCLR_OFF
    CMCON = 7 'Deactive Comparator RA0+, RA1-, RA2 out
    DEFINE OSC 16
    DEFINE CHAR_PACING 500

    ' ******* VARIABLES / CONSTANTS **************************
    Symbol BAUD = N2400
    Symbol OLED = PORTA.0 'pin13

    '*** Definition i/o
    'All OUTPUT
    TRISA = 0
    TRISC = 0

    Pause 1000

    Serout OLED, BAUD,[254,1] : pause 30 ' Clear Display
    Serout OLED, BAUD,[254,128] : PAuse 30 ' Line1, Col1

    LOOP:
    Serout OLED, BAUD, ["UUU"]
    Pause 1000
    Goto Loop

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Serial LCD display for PIC projects ?

    The three pulse bursts are well separated by 0.92msec and the display responds well.
    What is the relationship between parameter 500 and the 0.92msec timing?
    Why not 500µsec?
    Because at 2400 baud ~420us of that 0.92ms is the normal stopbit. Add to that the additional character pacing of 500us.

    At 2400 baud you'd also get the same result by specifying two stop-bits.

  3. #3
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: Serial LCD display for PIC projects ?

    @Henrick
    I have drawn the timeline in the case of a transmission of two spaced bytes with the command DEFINE CHAR_PACING 1000.
    I can see, however, that in addition to the normal Start bit of 410µs, another delay of 410 µs is added to the Pacing 1000!?
    Name:  Serial Burst.jpg
Views: 685
Size:  116.9 KB

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Serial LCD display for PIC projects ?

    No, you're forgetting the stop-bit! You have 1 startbit, 8 databits and 1 stopbit.

    In your diagram, from left to right: First you have the start-bit (1), then you have 8 data-bits (11000010), then you have the stop-bit (0) and THEN you have the 1000us CHAR_PACING before the next start-bit.

Similar Threads

  1. Need RFID PIC TAG with a LCD display
    By khalidjamil007 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th January 2010, 14:08
  2. Replies: 6
    Last Post: - 4th April 2007, 07:33
  3. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  4. serial LCD display?
    By ra68gi in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2006, 20:05
  5. SMART Serial 4 Digit LCD Display (SMARD4)
    By paul borgmeier in forum Adverts
    Replies: 0
    Last Post: - 5th January 2005, 05:50

Members who have read this thread : 1

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