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,

    Try adding a LED to an unused pin and blink it a few times at start-up. Just to verify that the PIC is still actually executing code.
    Will do.

    Are you using an extarnal crystal or are you running on the internal oscillator?
    Internal oscillator.

    It does seem strange that the PIC wrote the test lines to the LCD then stopped when the back-light was fired up. It would be nice if it were something not too serious.

    Dave

  2. #2
    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 added the LED and pause to the program and no (unless I've made another mistake) the LED doesn't blink,so program not / stopped running? Program doesn't 'run' with the back-light turned off either.

    Here's the code:

    ANSEL = %00000000 'Disable analog select so ports work as digital i/o.
    CMCON0 = %00000111 'Disable analog comparators.
    TRISA = %00000000 'Set PORTA as OUTPUT.
    PORTA = %00000000 'Set PORTA pins all low.
    TRISC = %00000000 'Set PORTC as OUTPUT.
    PORTC = %00000000 'Set PORTC pins all low.

    DEFINE LCD_DREG PORTC 'PORTC.0 WILL CONNECT TO DB4, PORTC3 TO DB7
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTC
    DEFINE LCD_RSBIT 4 'PORTC.4 CONNECT TO LCD PIN4
    DEFINE LCD_EREG PORTC
    DEFINE LCD_EBIT 5 'PORTC.5 CONNECT TO LCD PIN6
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 75

    DEFINE OSC 4

    MAIN:
    PAUSE 500
    HIGH PORTA.5
    PAUSE 500
    LOW PORTA.5
    PAUSE 500
    HIGH PORTA.5
    PAUSE 500
    LOW PORTA.5
    PAUSE 1500
    LCDOUT $FE,1,"*Hello WORLD*!"
    LCDOUT $FE,$C0,"I't WORKS!"
    LCDOUT $FE,$94,"I't WORKS!"
    LCDOUT $FE,$d4,"Oh dear it stopped!"
    PAUSE 500
    HIGH PORTA.5
    PAUSE 500
    LOW PORTA.5
    PAUSE 500
    HIGH PORTA.5
    PAUSE 500
    LOW PORTA.5
    PAUSE 50
    GOTO MAIN
    Dave
    Last edited by LEDave; - 22nd April 2010 at 19:52.

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


    Did you find this post helpful? Yes | No

    Default

    Well I changed the LCD_DATAUS n from 75 to 150 and the led fired up on PORTA.5, still no text on the LCD though.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    I would not think DATUS would cause the LED not to work...
    Have you adjusted the contrast POT after connecting the back light? Maybe it is just washed out ?
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Have you adjusted the contrast POT after connecting the back light? Maybe it is just washed out ?
    Yes, I've even disconnected the back light but can't see any text now, it hasn't reappeared.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    I've cracked it...........!!!.....Yippeee.

    PIN 5 onto LCD from PIC loose R/W.

    Henrik, mackrackit, really sorry to have caused a problem.

    The display looks great, bright but not too bright and the text is as clear as clear.
    Dave

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


    Did you find this post helpful? Yes | No

    Default

    If I only had a dime for everytime something like that has happened to me
    Dave
    Always wear safety glasses while programming.

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