Help Identify Pin Names from Datasheet on Serial/Parallel LCD/VFD


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Help Identify Pin Names from Datasheet on Serial/Parallel LCD/VFD

    OK I'm Lost...
    Ive been reading the manual but I just dont understand, there are 3 commands for serial out (serout, serout2, hserout) now ive tryed about 15 combinations of same code and I cant get anything but a english pound sign and 2 arrows to show up, sometimes random characters/symbols appending the line about every second.

    Here is some code I've tried useing.
    Code:
    Include "modedefs.bas"
    'DEFINE CHAR_PACING 104
    DEFINE SER2_BITS 9 'Set number of data bits
    DEFINE SER2_ODD 1
    
    PAUSE 500 ' Wait 0.5 second to initialize LCD
    TRISB = 0
    
    RPT:
    SEROUT PORTB.0, T9600 ,["T9600" ]
    pause 100
    SEROUT PORTB.0, N9600 ,["N9600" ]
    pause 100
    SEROUT2 PORTB.0, 38400,["38400"]
    pause 100
    SEROUT2 PORTB.0, 84,["84"]
    pause 100
    GOTO RPT
    END
    I've mixed and matched it so many ways., if someone could tell em what Im doing wrong or what im doing right.
    Ive read a few articles online but theres so many conflicting ideas about how to handle 8N2 serial out data.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Help Identify Pin Names from Datasheet on Serial/Parallel LCD/VFD

    DEFINE SER2_BITS 9 'Set number of data bits
    DEFINE SER2_ODD 1


    SEROUT assumes a 4MHz oscillator when generating its bit timing. To maintain the proper baud rate timing with other oscillator values, be sure to DEFINE the OSC setting to the new oscillator value.

    remove the above defines - serout2 default is 8N1 , your 2nd stopbit is done in the character pacing, can be as long as you want or equivalent to a single bit time.

    If you have the correct jumpers set for
    9600 and have TTL selected J4 1, Baud Rate J1,J2,J3 low (GND)



    Code:
    DEFINE CHAR_PACING 1000      'us = wait 1 millisecond ' this artificially deals with the second stop bit, and can be lowered as necessary
    
    
    PAUSE 2000 			'give display chance to initialise
    SEROUT2 PORTB.0,84,["HELLO "]
    PAUSE 1000                                 ' pause to read first word on its own
    SEROUT2 PORTB.0,84,["WORLD"]
    END

Similar Threads

  1. Replies: 3
    Last Post: - 5th January 2013, 01:04
  2. question about the pin to pin connections on a SPI interface
    By wdmagic in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th January 2013, 14:03
  3. Parallel LCD to Serial LCD
    By Mostafa in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th June 2007, 22:14
  4. serial in parallel out using PIC
    By daxki in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th April 2007, 02:06
  5. parallel LCD to serial LCD
    By maxbao in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th October 2006, 12:44

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