Thank You!


Closed Thread
Results 1 to 5 of 5

Thread: Thank You!

  1. #1

    Default Thank You!

    As I'm piddling about trying to learn all this with some ideas in mind, I keep thinking I must remember to thank all the people from here for all the help I've gotten. sure, you may not have answered a question from me directly, but your posts have answered sooooooooooo very many questions before I ever had the chance to ask!

    Melanie, Darrel, Trent, Bruce, Joe S., Steve, Russ, omg, this list would take up many pages if I really tried to type it out.. so if ya posted, I've probably read it and learned something, so thank you..

    and, to Darrel, sorry for mangling your code so badly. lol (you never saw the result, but wow what a mess I made.

    Code:
    asm
    INT_CODE                            ;if greater than 2k code_size pbp uato saves
                                        ;wsave,ssave,and psave (W,Status,PcLatH)
          if (CODE_SIZE <= 2)          ; contradictory - Only with PBP! if pure assembly, 
                                       ; we ALWAYS need to save these values. 
                                       ; as I don't do assembly yet, not an issue lol
            movwf   wsave              ; copy W to wsave register
            swapf   STATUS,W           ; swap status reg to be saved into W
            clrf    STATUS             ; change to bank 0 regardless of current bank
            movwf   ssave              ; save status reg to a bank 0 register
            movf    PCLATH,w           ; move PCLATH reg to be saved into W reg
            movwf   psave              ; save PCLATH reg to a bank 0 register
          endif
    
     btfss PIR1, TMR1IF       ; is TMR1IF set? "Bit Test Flag? Skip if Set"
     GOTO  NoTimer            ; No, exit interrupt  
     
     bcf     T1CON,TMR1ON        ; Turn off timer
    ;do i need bank change here?  NO, intcon AND T1CON are bank0!
     bcf      INTCON, 6      ; disable Peripheral interrupts
     bcf      INTCON, 7      ; disable Global interrupts
               
     MOVF _led1data,W
     call bin2seg
     MOVWF PORTD
     bsf _led1digit                   
     call dly7seg
     bcf _led1digit
     
     movf _led2data,W
     call bin2seg
     movwf PORTD
     bsf _led2digit
     call dly7seg
     bcf _led2digit
     
     movf _led3data,W
     call bin2seg
     movwf PORTD
     bsf _led3digit
     call dly7seg
     bcf _led3digit
     
     bcf     PIR1, TMR1IF     ; Clear Timer1 Interrupt Flag   PIR1 is bank0
                              
                              ; DT must have been counting cycles as it WAS critical
                              ; for sspwm!!!!  now I think I know where the +8 comes from
                              ; in his on_val/off_val calculations
     MOVF    _TMR1_VAL,W      ;  1   ;blatantly stolen from DT's SSPWM  (less than Vague understanding)
     ADDWF   TMR1L,F          ;  1   ; reload timer with correct value
     BTFSC   STATUS,C         ;  1/2 ;Say wha? i'm lost here 
                                     ;ok, if byte less than 255, no carry so skip
     INCF    TMR1H,F          ;  1   ;was a carry so add 1 to high reg?
     MOVF    _TMR1_VAL+1,W    ;  1   ;I have no idea what how why!?
     ADDWF   TMR1H,F          ;  1   ;lowbyte/high byte? but how is shifting done?
     bsf     T1CON,TMR1ON     ;  1   ; Turn it back on T1CON is bank0
            
     ;will need to understand how the --ll that works. Must ASK DT or pbp group
     ;seems fundamental to know how to load a timer duh
     ;maybe if I write it out it will become obvious, 
     ;more than likely will stay as visible as air lol
     ;reload timer here?   ;DONE, we want to be able to control LED refresh times
     ;restart timer here?  ;DONE as part of timer reload
     
     ;do i need bank change here?  NO, intcon is bank0
     bsf      INTCON, 6      ; Re-Enable Peripheral interrupts
     bsf      INTCON, 7      ; Re-Enable Global interrupts
        
    NoTimer      
            movf    psave,w             ; Restore the PCLATH reg
            movwf   PCLATH
            swapf   ssave,w             ; Restore the STATUS reg			
            movwf   STATUS
            swapf   wsave,f
            swapf   wsave,w    ; 6/34   ; Restore W reg
            
               
        Retfie                          ; Exit the interrupt routine
    probably cant even remember where that's from is so twisted lol.. (and broken now, been scrapped and redone)

    for something lighter?

    Code:
    presetbut:
    pretemp=0
    if presetbutton=1 then
    return
    else
    while presetbutton=0
    pretemp=pretemp+1
    pause 50
    if pretemp=1 then
    lcdout $fe,1,"Preset"
    endif
    if pretemp=200 then
    lcdout $fe,$c0,"Stored"
    endif
    if pretemp=1000 then
    lcdout $fe,1,"LEGGO MY BUTTON!"
    endif
    if pretemp=5000 then
    lcdout $FE,1,  "SELF DESTRUCT"
    lcdout $fe,$c0,"  ACTIVATED! "
    pause 500
    LCDOUT $fe,$c0,"             "
    for dummy=5 to 0 step -1
    lcdout $fe,$c0,#dummy
    pause 700
    next dummy
    lcdout $FE,1,"Melanie says:"
    lcdout $FE,$C0,"Drink More Beer!"
    'must thank Melanie for button routine examples, made it easy to figure out.
    TMR1ON = 0 'turn off display timer ie, no interrupt!
    @ sleep  ;ni ni, gotta turn off then back on. I so mean! 
    endif
    wend
    if pretemp>199 then
    write 1,y
    else
    read 1,y
    gosub setch    'set output, get display info
    lcdout $fe,1,"Preset"
    lcdout $fe,$c0,"loaded"
    pause 1000
    gosub display2 'refresh display with appropriate new info
    endif
    endif
    return
    lol, did that for a friends transciever. :P

    and yes, you got a mini peek of me talking to myself in the notes. :P

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


    Did you find this post helpful? Yes | No

    Default

    Hi nomad,
    First of all, What an honor that you included me in the lofty company you mentioned, I am not sure it is deserved as I am a beginner too, I would like to Thank You and everyone else who has the courage to post their code, and ask for help, as it provides me an opportunity to fiddle with it and try to sort it out, enabling me to learn too. That's why I am here, that and it is a chance to give back, for what I have received.
    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.

  3. #3
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Amen to that

    Ahhh yes, a chance to join in on a BIG THANKS to all here who contribute their time and talent so everyone else can learn.
    Louie

  4. #4


    Did you find this post helpful? Yes | No

    Default Joe

    lol, Joe, as Dora the explorer says "backpack backpack".... that one project searching for your holy grail, erm the serial backpack.. Learned TONS from figuring out how why that was all done, and how to change it up for what I needed on whatever pic I needed it on.

    Can you tell I have kids? :P
    Last edited by nomad; - 2nd March 2009 at 03:19.

  5. #5
    Join Date
    Oct 2008
    Location
    Ashland, KY
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    I, too, am VERY thankful for this website and the great Gurus that are so willing to help us all! I know I haven't posted in a while, but I have been here in the background searching for the answers to the questions and problems I've encountered lately. School and homework have kept me so busy that I don't have enough time to work on my projects everyday, but I can rest assured knowing that I'll be able to find the help I need to complete them (whenever I can get around to it) on this site...

    Thanks for all the help, guys!
    -Adam Collins

Members who have read this thread : 1

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