lcdout wont work with a 18f4610


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77

    Post lcdout wont work with a 18f4610

    Hi all

    the folowing one line "lcdout" command works with any other pic
    i program but it won't work with a 18f4610, WHY ?

    All input apreciated.
    ---------------
    Bri

    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTE
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTE
    DEFINE LCD_EBIT 1
    DEFINE OSC 8

    ADCON1 = 7

    Pause 1000

    Main:

    LCDOut $fe,1,"hello"

    Stop

    End
    Reading the datasheet & understanding it are two different things.

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


    Did you find this post helpful? Yes | No

    Default

    Try ADCON1=$0F

    case not working

    Are you using PICSTART ??? Are you able to BLANK PIC and check for BLANK ALL ???

    Is anything else work with...like LED Blink...

    Did you set config fuse to HS OSC??

    Is those define do something better

    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

    case else try increase to previous to higher values...
    Steve

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

  3. #3
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Smile

    Hi mister_e

    I tried changing "ADCON1 = 7" to "ADCON1 = $0f" and it works !!!
    :-)

    Thanks
    ---------------
    Bri

    Ps: if you have time you could tell me what the diffrence is between the two commands.
    Reading the datasheet & understanding it are two different things.

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


    Did you find this post helpful? Yes | No

    Thumbs up

    Hi Bri,

    Great to know everything is working fine for you now !

    Since every PIC can be different, refer to datasheet for ADCON1 setting of your PIC18F4610.

    Open your datasheet or PDF http://ww1.microchip.com/downloads/e...Doc/39636a.pdf

    at the REGISTER 18-2 ADCON1 (pdf page 214)

    to get all pin to digital you must set ADCON1 to $0F, 15, or %00001111.

    if you're setting ADCON1=7, you will get only AN<12:8> to digital, the rest to analog.

    that's it, that's all, basketball!!!
    Steve

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

  5. #5
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Smile

    Hi Steve

    Thanks for explaining it to me, this 18f4610 seems realy dificult to get things to work compaired with the other pic's i have used.

    before i put my question on here i thought that the problem might be the port pins not being set to digital/output so i wrote "trisd = 0" and "trise = 0" but that did not help.
    I thought that the "trisx = 0" made the port an output ?

    anyway, it works now.

    Thanks again
    -------------
    Bri
    Reading the datasheet & understanding it are two different things.

Similar Threads

  1. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  2. need help in coding..
    By daphne8888 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 19th March 2008, 07:31
  3. Help GPS read with serin
    By leinske in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th September 2007, 02:33
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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