LCD & defaults


Closed Thread
Results 1 to 5 of 5

Thread: LCD & defaults

Hybrid View

  1. #1
    trying's Avatar
    trying Guest


    Did you find this post helpful? Yes | No

    Smile

    thanks
    even when you cut and paste make sure what you cut is what you need
    typos are killing me

  2. #2
    trying's Avatar
    trying Guest


    Did you find this post helpful? Yes | No

    Default

    Well after alittle help here and some port changes its working
    thanks

    @ DEVICE pic16f630
    @ DEVICE pic16f630, INTRC_OSC_NOCLKOUT
    @ DEVICE pic16f630, WDT_ON
    @ DEVICE pic16f630, MCLR_OFF 'TEST LCD
    @ DEVICE pic16f630, CPD_OFF ' 16F630
    @ DEVICE pic16f630, BOD_OFF '
    @ DEVICE pic16f630, PWRT_ON
    @ DEVICE pic16f630, PROTECT_OFF
    DEFINE OSC 4
    Pause 10000 ' Allow pic to Stabilize

    CMCON = 7 'COMPARATOR OFF
    VRCON = 0 'VOLTAGE REF. DISABLE
    TRISA = %00001000 'MAKE PORTA OUTPUTS(.3 MUST BE INPUT)
    TRISC = %00000000 'MAKE ALL PORTC OUTPUTS
    SYMBOL LED= PORTA.5 'POWER UP LED
    LED=0

    DEFINE CHAR_PACING 1000
    DEFINE LCD_DREG PORTC ' Set LCD Data PORTC
    DEFINE LCD_DBIT 0 ' Set starting Data BIT (0 OR 4) IF 4-BIT bus
    DEFINE LCD_RSREG PORTC ' Set LCD Register Select PORTC
    DEFINE LCD_RSBIT 5 ' Set LCD Register Select BIT PORTC
    DEFINE LCD_EREG PORTC ' Set LCD Enable PORTC
    DEFINE LCD_EBIT 4 ' Set LCD Enable BIT PORTC.3
    DEFINE LCD_BITS 4 ' Set LCD bus size (4 OR 8 bits)
    DEFINE LCD_LINES 2 ' Set number of lines ON LCD
    DEFINE LCD_COMMANDUS 2000 ' Set command delay time in us
    DEFINE LCD_DATAUS 50 ' Set Data delay time in us

    LED=1
    Pause 350 'POWER OK
    LED=0



    Pause 2000

    LCDOut $FE,1,"IT MUST BE" 'CLEAR SCREEN 'PRINT, "IT MUST BE"

    LCDOut $FE,$C0,"WORKING" '2ND. LINE PRINT "WORKING"

    End

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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