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 mackrackit,

    I've been busy working on the last assignment....

    Quick question. Would the code (below) output the value of B_P onto my LCD? B_P is a VAR WORD. I've used DEC1 as I only want to test the output with a couple of button presses (if that makes sense).

    Code:
     LCDOUT $FE,1
    LCDOUT $FE,DEC1 B_P
    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Well... what did you get on your display?
    Code:
    B_P = 12345
    LCDOUT $FE,$C0,DEC1 B_P 'Displays 5
    
    LCDOUT $FE,$C0,DEC2 B_P 'Displays 45
    
    LCDOUT $FE,$C0,DEC3 B_P 'Displays 345
    
    LCDOUT $FE,$C0,DEC4 B_P 'Displays 2345
    
    LCDOUT $FE,$C0,DEC5 B_P 'Displays 12345
    
    LCDOUT $FE,$C0,DEC B_P 'Displays 12345
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Really sorry for the late reply, has been one of those days today.

    I've got a couple of small problems with LCD / Counting at the moment, nothing I shouldn't be able to fix by now so please bear with me. If I can't get it going soon I'll have to ask.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Really sorry for the late reply, has been one of those days today.
    Days???
    I have been having one of those weeks
    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,

    I have been having one of those weeks
    Lol..... Nice to know I'm not alone, you do have my sympathy though.

    Here's what I thought was a silly question, now I'm not so sure it is:

    When you declare a VAR WORD, I thought that the value would automatically be set at zero, now I'm not so sure it is. Do you have to have to re-set it to zero before you start a count program or is it zero already?

    I know it's Friday tomorrow but I hope your week gets better.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Sometimes it will be zero at power up but you never know.

    You can use CLEAR, in the manual

    or

    VAR_IN_QUESTION = 0

    Not a stupid question at all
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Not a stupid question at all
    Cheers mackrackit, I'm feeling better already I hope you are too!

    So probably good practice to set VAR_IN_QUESTION = 0 just in case.

    Hopefully I'll have moved the program on tomorrow, fingers x'd.

    Right, time for me bed.

    See you tomorrow.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Question: How long does it take LEDave to wire a push_button_switch to a PIC16F684?

    Answer: About 48hrs

    I think the program below should work ok:

    Code:
    Total var word
    clear
    
    MAIN:
    if PORTA.5 = 0  then  count_up:
    IF PORTA.5 = 1  THEN      MAIN: 
        
    Count_up:
    let Total = Total + 1 
    pauseus 25   
    LCDOUT $FE,1
    LCDOUT $FE,$C0,DEC Total
    PAUSE 500    
    GOTO MAIN:
    LEDave current status: Eyes going, mind boarderline!

    Dvae

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