lost in lcd land


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Question update

    the code is the example in pbp book lcdout pg 94
    wiring checks ok using internal osc on 628a

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Did you add CMCON=7 ?
    Is any pull-up resistor on RA.4?
    Did you add a start-up delay for the LCD between 500mSec and 2 Second before using the first LCDOUT?
    Are you sure of your Config Fuse setting for the MCLR pin and Internal OSC?
    ...
    ...
    ...
    Are you sure your LCD controller is compatible with the Hitachi one?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Exclamation still need help

    yes to the first ones ???? how do you set config fuse never seen this one in the manual?? does anyone else think the manual is very weak and not for the newbe

  4. #4
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    The config isn't the easiest thing to set. Here's how I do it:

    First, I set my assembler to MPASM. You'll find a tab for this in MCS under View | Compile & Program Options.

    Then, find the .inc file under the PBP folder that PBP used for your specific device, such as 16F628A.INC for the 628A you mentioned you might use.

    Open this file in any text editor (notepad works!) and find the __config fine, and comment it with a semicolon (that's the comment character in assembly)

    MPLAB makes a nice platform to set your config bits. Select the device you're using and find the config bits panel. You can see all the config choices, select them, and it gives you the proper names and valuses for the config settings.

    In your .bas file, add the config settings. Here's how that looked for a recent F88 project of mine:

    asm
    __config _CONFIG1, 2f50h
    __config _CONFIG2, 3ffch
    endasm

    2cents: When I'm trying to get a new PIC project up, I do the smallest steps first, things like set the osc frequency and have it come out on a pin so I can make sure I at keast have the clock I need.

    The OSC statement does not set the oscillator, it just tells the compiler what freq you think you're running the osc at.

  5. #5


    Did you find this post helpful? Yes | No

    Red face still trying

    thanks for your help. did not find the line in my include file to rem out
    tried adding your line got several errors about symble not defined did assemble
    however it did not solve the problem any help would be appreicated

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Using MPASM
    Code:
        '
        '    PIC Configuration
        '    =================
        @ __CONFIG  _INTRC_OSC_NOCLKOUT & _MCLRE_OFF  &  _LVP_OFF & _WDT_OFF & _PWRTE_ON  & _BODEN_ON  
        
        '
        '    Hardware configuration
        '    ======================
        CMCON=7                    ' disable internal comparator
        TRISA=0                    ' Set all PORTA capable i/o to output
        TRISB=0                    ' Set all PORTB i/o to output
        
        '
        '    Hardware initialisation
        '    =======================
        Pause 1000                 ' 1 second for LCD initialisation
        
        '
        '    Main loop
        '    =========
    Start:
        LCDOUT $FE,1,"Should Work now!"
    Here:
        Goto here
    Using PM
    Code:
        '
        '    PIC Configuration
        '    =================
        @ DEVICE  PIC16F628, INTRC_OSC_NOCLKOUT, WDT_OFF, PWRT_ON, MCLR_OFF, LVP_OFF, PROTECT_OFF
        
        '
        '    Hardware configuration
        '    ======================
        CMCON=7                    ' disable internal comparator
        TRISA=0                    ' Set all PORTA capable i/o to output
        TRISB=0                    ' Set all PORTB i/o to output
        
        '
        '    Hardware initialisation
        '    =======================
        Pause 1000                 ' 1 second for LCD initialisation
        
        '
        '    Main loop
        '    =========
    Start:
        LCDOUT $FE,1,"Should Work now!"
    Here:
        Goto here
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7


    Did you find this post helpful? Yes | No

    Unhappy still trying

    problem seems to be the microstudio does not like the inc files that came with the pbp and this is the one i seem to need but get many errors works much better with the include files that came with mplab still doesnot give what i want but no errors. tried to unstall everthing and reinstall but no use
    could reall use some help here??/

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. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  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