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

    Well I compiled it and it ran........ Like you say I wasn't a million miles off on this one which is pleasing.

    But there is still one small problem...
    Mmm, I've looked and looked and I can't see one. Was it from the original brief where you said use a CONSTANT and I've used a VARIABLE?

    Quick question. In the program you made the change of address from $60 to $40, that's because the Custom characters are given memory addresses $40.....$78 (Char 0 - 7) and they must be sequential right? In other words I had Character '0' at address $60 which was a mistake.

    Also having the:

    LCDOUT $FE,1
    Simply clears the display on every loop so the next increment of LC moves the character along one and clears the previous character.

    Dave (Oop's what's next?)

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LEDave View Post
    Mmm, I've looked and looked and I can't see one. Was it from the original brief where you said use a CONSTANT and I've used a VARIABLE?
    OOPPSS! Now I am the one that can not count. I have a 16x4 I use for testing. It would work for you 20x4 display.
    Quick question. In the program you made the change of address from $60 to $40, that's because the Custom characters are given memory addresses $40.....$78 (Char 0 - 7) and they must be sequential right? In other words I had Character '0' at address $60 which was a mistake.
    Yes, your were calling the wrong address.
    Simply clears the display on every loop so the next increment of LC moves the character along one and clears the previous character.
    Code:
    LCDOUT $FE,1
    Can not have a character location after it, only display commands. But for spped you can do this, (a snippet from,,)
    Code:
     LCDOUT $FE,1,"THE TEMPERATURE",$FE,$C0,"IS: ",DEC TRESULT,$FE,$90,"BAD READS ",DEC BCS
    Dave (Oop's what's next?)
    I will get back to you with something
    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

    Thanks for that mackrackit, a great help.

    I will get back to you with something
    As and when mackrackit, we're all busy.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Had to look over what we have done so far.
    Serial
    LCD
    Some program flow.
    Input from a switch

    How about remembering something?
    Let's say you have some parts moving along a conveyor and you want to count how many parts have passed by a certain point. But the problem is when the machine is turned off and then turned back on the counting starts back at zero and you want total parts counted for a week.

    You can use the push button to simulate when a part passes by and have a WORD size variable increment each time the switch is activated and that value displayed someplace (serial or LCD).

    To save the value for when the machine is turned off and on you will need to save the value to EEPROM and read from the EEPROM when the machine is started again. Place that value into the counting variable to continue counting from where it left off.

    Another problem that can be addressed later is the EEPROM only has 1,000,000 write cycles so if the EEPROM is written to each time a part passes depending on how fast things are moving you could wear out the EEPROM in a matter of weeks.
    So a shut down sequence is needed to only write to the EEPROM at shut down. This is not hard for scheduled shut downs but can be a "trick" for power failures.

    For now you can have the value written to The EEPROM each time the variable is incremented.

    Are you still using a 16F684 ?
    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

    How about remembering something?
    I'm a carer, I know a thing or two about remembering.....

    Are you still using a 16F684 ?
    Yes still with the 16F684, do I need a more suitable chip?

    Just an aside here, I was looking at in the RS catalogue the other day, they have a PICKit2 for a good price. Is this the next one up for me? Or should I stick with the PICkit1 for now?

    http://uk.rs-online.com/web/search/s...duct&R=0149613

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


    Did you find this post helpful? Yes | No

    Default

    The 16F684 is fine for now. It all depends on what you need to do. More I/Os, memory, built in hardware? But for learning the small ones are good.

    I am a big fan of the PicKit2 so if you can get one at a good price do so. But for now the PicKit1 is fine for the parts you are using. It is just very limited parts wise.

    What do you have in mind to do with all of this? Home automation/monitoring?

    There is so much that can be done with the "small" parts and they can be made to share information they may be all you need.
    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

    What do you have in mind to do with all of this? Home automation/monitoring?
    You know I really don't have a direct answer to that one. I've got a couple of small projects in the offing (I'll tell you about them later) and some ideas.The thing is, it's almost unlimited in what you can do! For me right now, it's about building a sound knowledge base, plus it's really absorbing, fascinating, I love it.

    Dave
    Last edited by LEDave; - 27th April 2010 at 16:47.

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