12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hey Dave,
    Did my code work on your PicKit1 board?
    I did find a couple 684s in the bottom of a drawer. Once the pins were straightned out they worked in the test board. But I had to program them with a PicKit2 The PicKit1 kept giving an error?
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    Sorry for the late reply, Sunday is 'family' day(say no more!).

    Did my code work on your PicKit1 board?
    I did find a couple 684s in the bottom of a drawer. Once the pins were straightned out they worked in the test board. But I had to program them with a PicKit2 The PicKit1 kept giving an error?
    I had some errors on Compiling the first program, so had a hunt around looking for Configuration_Fuse info (found this page:http://www.picbasic.co.uk/forum/showthread.php?t=543)

    So changed your code to this for the 684:

    Code:
     DEFINE OSC 4
    
    CMCON0 - from CMON
     
      @DEVICE_INTRC_OSC_NOCLKOUT 
      @DEVICE_WDT_ON
      @DEVICE_MCLRE_OFF 
      @DEVICE_CP_OFF
    The program compiled and ran a treat. What happens is that when a Voltage of 2.5V appears on PORTA.0 (pin13 on the 684) the LED's on D0-D3 light in turn on after the other. If the Voltage drops below 2.5V they turn off. How does that sound.

    Dave
    Last edited by LEDave; - 1st August 2010 at 20:25.

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


    Did you find this post helpful? Yes | No

    Default

    Yup, family come first!!!

    I use MPASM in place of PM for the assembler. If you are using Micro Code Studio you can change that in compiler options. PM is OK though, until you get to using 18F parts.

    Yes, on the first code the analog break point is at the halfway point.
    When you get a chance to run the second code you will see how it is split even more. Lots of things can be done with this, like the code shows, one input can effectively become many, sort of.

    Now take all this back to the LDR thing and you can have light, dark, and options for something in between.
    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

    For the second program I made the same Config changes, the program worked a treat two:

    When the pot is turned LED D3 lights at approx:1.25V (pin13), D2 lights at 2.5V (D3 goes out). At 3.75V D1 lights (D2 goes out). And at 4.95V D0 lights up and D1 goes out.

    I must say mackrackit, this is very clever stuff.

    I'm thinking for the project, the LDR set against a pre-defined ADC voltage trigger level would be spot on to send the data at a set light night time light level.

    I'm still doing loads of reading / studying, I've got a few things I'm not sure of so may have to get back to you on those, bear with me.

    Dave
    Last edited by LEDave; - 1st August 2010 at 20:48.

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


    Did you find this post helpful? Yes | No

    Default

    Ah, I see you posted while I was still composing.....

    Now take all this back to the LDR thing and you can have light, dark, and options for something in between.
    Yes this would work a dream.

    I think this project will contain nearly everything we've covered so far in one program RF.ADC,SEROUT2,EEPROM data storage, Serial Communicator - LCD......!

    Loving it: Dave

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


    Did you find this post helpful? Yes | No

    Thumbs up

    I'm still doing loads of reading / studying, I've got a few things I'm not sure of so may have to get back to you on those, bear with me.
    No problem. If only all students worked as hard as you have...

    I think this project will contain nearly everything we've covered so far in one program RF.ADC,SEROUT2,EEPROM data storage, Serial Communicator - LCD......!
    And all since February... COOL!!!!
    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

    No problem. If only all students worked as hard as you have...
    Like I said way back when mackrackit, I'm not naturally bright but I am a trier....

    And all since February... COOL!!!!
    Yes it's amazing really. As we all know I couldn't blink an LED when I first came here...! As much to do with the Teacher as the pupil me thinks / knows...!

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Hey Dave..

    What happens if the order of CASE IS is switched around? Why?
    Code:
     SELECT CASE CHAN0  
               CASE IS > 254    
                    TRISA = %11001111 
                    PORTA = %00010000  
               CASE IS > 192  
                    TRISA = %11001111 
                    PORTA = %00100000 
               CASE IS > 128  
                    TRISA = %11101011 
                    PORTA = %00010000 
               CASE IS > 64  
                    TRISA = %11101011 
                    PORTA = %00000100 
               CASE ELSE 
                    PORTA = %00000000 
        END SELECT
    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