Menu selection


Results 1 to 8 of 8

Thread: Menu selection

Threaded View

  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Menu selection

    OOOoookk
    Here it is. I am doing something and I am not sure how to..

    Ok I have a while loop, .. well for starters I have two button, 1-Start 2-go th the recorded time
    here is the while loop:

    While PORTB.2 != 1 ' if start button is not push do this loop

    While voltage_percent != 100 ' Charge the battery
    Gosub Charge_TwelveVolt
    Gosub Battery_Charging 'LCD out battery charging and percentage
    Wend

    Gosub Wait_60_Minutes 'wait 60 min

    While voltage_check <= 325 ' DisCharge the battery until its empty
    PORTB.3 = 1 'Turn relay ON, Lights will turn on
    I2CREAD SDA,SCL,$D1,$00,[STR DB0\8] ' Read 8 bytes from DS1307
    Gosub Check_voltage 'Check battery voltage, stay in this loop while it is not empty
    if (voltage_check <= TwelveVoltLimit) and (voltage_check > 325) then
    voltage_percent = (((voltage_check -325) * 3500 ) / 100 )
    if (voltage_check <= 325) then
    voltage_percent = 0
    else
    voltage_percent = 100
    endif
    endif
    Gosub Battery_DisCharging 'LCD out the battery discharge information
    Voltage_Array_Charge_time(Battery_Cycle_Counter) = timer_time
    Voltage_Array_Discharge_time (Battery_Cycle_Counter) = timer_time
    Battery_Cycle_Counter = Battery_Cycle_Counter + 1
    Wend
    Wend

    'Now we are of the loop and
    'Show time battery discharge times chronologically. You have a button that goes through ll 'the times that has been recoded in the array.... and if no button is selected for 15 seconds, then the program returns to While PORTB.2 != 1 loop This is where I have no idea what to do..

    help ?
    maybe I am too sleepy

    K
    Last edited by lerameur; - 19th November 2010 at 02:57.

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