Soldering station


Closed Thread
Results 1 to 38 of 38

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    You can still shave some bytes...

    - you don't need 2 spi routines LCD_ByteOut & PrintDataLcd,
    - replace the For-To-Next loop with Repeat-Until ones,
    - if at all possible, try to skip the div32.
    - use internal timer for delays (not sure it will that much though
    - pwm with a high/low loop maybe?
    - select case for a couple a if-then

    couples of ideas like that. sounds like a nice challenge
    Last edited by mister_e; - 13th July 2011 at 18:37.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    Another thing about the graphic part, I've messed with it a lot recently and I saved a load of code space by skipping the whole SELCT-CASE + Lookup thing by using something like
    Code:
    SearchChar:
            read (index), char
            if char == TheCharYoureLookingFor then
                Gosub PrintIt
                index=endtable
                endif
            index=index+6
            if (index)<endtable then SearchChar
    But you need to modify a little bit the way your DATA lines are done.
    Code:
                DATA @0,"0",$3E,$51,$49,$45,$3E,_       ';// 0                   
                        "1",$00,$42,$7F,$40,$00,_       ';// 1
                        "2",$42,$61,$51,$49,$46,_       ';// 2
                        "3",$21,$41,$45,$4B,$31,_       ';// 3
                        "4",$18,$14,$12,$7F,$10,_       ';// 4
                        "5",$27,$45,$45,$45,$39,_       ';// 5
                        "6",$3C,$4A,$49,$49,$30,_       ';// 6
                        "7",$01,$71,$09,$05,$03,_       ';// 7
                        "8",$36,$49,$49,$49,$36,_       ';// 8
                        "9",$06,$49,$49,$29,$1E,_       ';// 9
                        "+",$08,$08,$3E,$08,$08,_       ';// +
                        "-",$08,$08,$08,$08,$08,_       ';// -
                        ".",$00,$60,$60,$00,$00,_       ';// .
                        "G",$00,$02,$05,$02,$00,_       ' grad
                        "C",$3E,$41,$41,$41,$22,_       ' C
                        "M",$7F,$02,$0C,$02,$7F,_       ' M     
                        " ",$00,$00,$00,$00,$00,_       ' space
                        "^",$08,$04,$7F,$04,$08,_       ' arrow up
                        "_",$20,$40,$7F,$40,$20         ' arrow down
    so when you want to display your grad character, just need to send G to that routine above. Simple... if it fits the EEPROM ...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    Hi,
    314 words is the size when compiled by itself. Depending on what functions your code uses it might already have one or more of the PBP library routines included meaning the total size will be less than whatever + 314 words.

    But like I said, the problem in this case is likely the amount of available RAM. If my count is correct your code uses 23 bytes and the original incPID uses 29 bytes, then, if I'm not mistaken, PBP adds ~24 bytes for its internal use (might change depending on what library routines are used, I don't know for sure). All in all this adds up to more than the 64 bytes of RAM available on the 12F675.

    What I meant with not being worth it wasn't that you should throw a "bigger" PIC at the issue. I meant that I don't think the effort of implementing incPID is worth it considering the performance gain you might get compared to the aproaches already discussed. Sure, it it fits it's wort a try, if it doesn't fit I'd try to make do with what's available.

    Finally incPID was written in order to be versatile and easy to use. It's probably possible to reduce the size and amount of RAM needed further if adapting it to a specific application - but that's up to anyone using it to do.

    /Henrik.

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    I'm sure there is something I am missing here but,
    Still have BIG thermal inertia of iron soldering (about 7-8 degree)...
    Do you think you can do better then this? Or need to? Now if its an excersize in learning and just the fun of doing it, well thats a great reason. But I would think the tip temp will cool that much if you just blow on the tip. but to raise it will take full power for a few seconds to get it back, then it will overshoot. Just my HO.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    Quote Originally Posted by cncmachineguy View Post
    I'm sure there is something I am missing here but,


    Do you think you can do better then this? Or need to? Now if its an exercise in learning and just the fun of doing it, well that's a great reason. But I would think the tip temp will cool that much if you just blow on the tip. but to raise it will take full power for a few seconds to get it back, then it will overshoot. Just my HO.
    Just so we are all playing on the same field . . . are we talking degrees C or degrees F ? I am guessing Centigrade so that's more like 13 or 14 Fahrenheit.
    Check out Robert's article:
    http://itech.fgcu.edu/faculty/zalews...PIDcontrol.pdf
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    Sure enough, it's not Kelvin... just sayin
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    Quote Originally Posted by mister_e View Post
    Sure enough, it's not Kelvin... just sayin
    Hey! He (Kelvin) used to work for me . . .
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  8. #8
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    971


    Did you find this post helpful? Yes | No

    Default Re: Soldering station

    I can hazard a guess that changing this section of code
    Code:
         vt=adval * 500      
                vt=div32 1023 
                grup=vt+grup  
                PAUSE 10
    to this
    vt=adval >> 1
    grup=vt+grup
    PAUSE 10
    might save you a bit of code & ram space. But, I've not checked this, so, you'll beware. Again, if you notice,
    I've used an approximation of divide by 2(500/1000) for 500/1023 instead of 1/2.046 I do not think it will matter much if you calibrate
    the readings.

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