12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi Henrik

    I've bought a breadboard today and have decided to make the project on it.
    So starting from scratch really.

    Yes the code does need adjusting to match the manual (probably the best way around at this stage) so lots to do and think about.

    If this LCD ever fires up and works it'll be a minor, no major miracle!

    Dave

  2. #2
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Not having a very good night here. I've been working realy hard with zero results so far.

    I've attached wires 1-6 on to the LCD - power supply - and PIC (the PIC hasn't been DEFINED yet) but the LCD display hasn't shown any sign of life at all (I was just hoping the display would at least light up).

    My only hope is that the PIC has to have the right DEFINE's in place even to light up, fingers x'd that's the case, or NASA I've got a problem

    Dave

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I would not expect much till it is all connected and coded.
    Do you have a POT on he contrast pin?

    Still having trouble after all is connected post the connections, code, and trouble having.
    Do not forget to turn off the ADC...
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Yes there is a pot on the contrast pin, the manual said 20k best I could buy today was a 25k (I turned the pot just in case it was 'dark') the display never lit up though.

    So I need to get the right program settings into the PIC before it will even light up then? That's a good thing, because there's still hope!

    I'll have a try at getting the program set up tomorrow and see what you and Henrik think. There aren't any DEFINES at all inside the PIC at the moment (might just explain it I guess).

    Dave
    Last edited by LEDave; - 20th April 2010 at 00:40.

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default

    Hi Dave,
    I went over your suggested connection scheme again and it looks OK. I would expect the LCD segments to at least be visible with the contrast pot is turned towards one end - that's what I've seen on other displays. But don't worry, get it all connected and get some basic code into the PIC.

    I'm not 100% sure if the LCDOut commands automatically sets the TRIS registers for the Enable and RS bit of the LCD but it certanly doesn't hurt to do that "manually" just to be sure it's correct. And, as mackrackit already pointed out, don't forget the ADC.

    I think these DEFINEs should match your connection scheme:
    Code:
    DEFINE LCD_DREG PORTA    'Databus, D4-D7 on PortA
    DEFINE LCD_DBIT 0        'Starting at PortA.0
    
    DEFINE LCD_RSREG PORTA   'LCD RegisterSelect on PortA...
    DEFINE LCD_RSBIT 4       '...bit4
    
    DEFINE LCD_EREG PORTB    'LCD Enable-signal on PortB...
    DEFINE LCD_EBIT 3        '...bit 3
    
    DEFINE LCD_LINES 2       'LCD has two lines and...
    DEFINE LCD_BITS 4        '...is using 4 bit databus
    
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    /Henrik.

  6. #6
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    .....................
    Last edited by LEDave; - 20th April 2010 at 09:46.

  7. #7
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi Henrik

    Here's what I'd come up with late last night (I wish I'd posted it now before I went to bed as not the far off I don't think).

    Code:
    DEFINE LCD_DREG PORT.A        ' Set LCD Data port
    DEFINE LCD_DBIT 0             ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_RSREG PORT.A       ' Set LCD Register Select port
    DEFINE LCD_RSBIT 4            ' Set LCD Register Select bit
    DEFINE LCD_EREG PORTC         ' Set LCD Enable port
    DEFINE LCD_EBIT 0             ' Set LCD Enable bit
    DEFINE LCD_BITS 4             ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES 4            ' Set number of lines on LCD
    DEFINE LCD_COMMANDUS 2000     ' Set command delay time in us
    DEFINE LCD_DATAUS 50
    I set LCD_LINES 4 as the display is a 4*20.

    The one I'm missed was LCD_EBIT 0 (it was late).

    Also the PIC is a 16F684 PORTA and PORTC

    Thank you for taking the time to do go through it all though (really appreciated) I'll load it later today and hopefully have some success (I'm just a little worried I've fried the LCD).

    David
    Last edited by LEDave; - 20th April 2010 at 10:03.

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