LCD to serial input

Discussion in 'Embedded Systems and Microcontrollers' started by sanwa, Mar 1, 2009.

  1. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    From the asm source code, there are calculations on the watt and ampere hour.
    But for my project, i intended to get only the ampere hour reading out. So I tried my best to study the asm code though i am numb in asm.

    Calculating the ampere hour
    Code ( (Unknown Language)):
    2. calc_Ah:
    3.     add1632    Amps,AmpSum    ; AmpSum = accumulated Amps
    4.     mov32    AmpSum,dd
    5.     movi16    3600*3,aa    ; 3 reads per second, 3600 seconds per hour
    6.     call    Div32        ; AmpHours = AmpSum  / (reads per hour)
    7. store_Ah:
    8.     mov16    dd+2,AmpHours
    And here is the part to display the reading at a 16x2 line LCD
    Code ( (Unknown Language)):
    2. .....
    3. call    Show_AmpHours     ; "9999.9W 99.99Ah"
    4. .....
    But the code is intended to display it on the LCD. How to modify it so that i can directly get a single stream for only the ampere hour data out from a PIC?

    I am just leaving this particular part, can someone kind enough guide me?