Hi,
well this is not exactly whT I am looking for:
Mainly I have a battery tester which will charge a battery, record the time it took to charge, wait 60 min, discharge the battery, record the time ot took to discharge, and repeat this cycle indefinately. I want the user to be able to SEE the recorded time any time they want to. Here is my Sub routine that does this, although this subroutine gave me a Fatal error- out of memory:
Code:'//////////////////////////////////////// '/// Display_Charge_Discharge_Time ///// '//////////////////////////////////////// Display_Charge_Discharge_Time: 'Show time battery discharge times, Here is the result of a push on PORTB.3 lcdout $FE,1, " Appuyé sur Suivant " lcdout $FE,$C0, "Press on next" pause 100 if Battery_Cycle_Discharge_Counter = 0 then lcdout $FE,1, " Aucun test Decharge" lcdout $FE,$C0, "No DisC test" pause 5000 Endif if Battery_Cycle_Charge_Counter = 0 then lcdout $FE,1, " Aucun test Charge" lcdout $FE,$C0, "No Charge test" pause 5000 Endif if (Battery_Cycle_Charge_Counter = 0) AND (Battery_Cycle_Discharge_Counter = 0) then lcdout $FE,1, " Aucun Cycle " lcdout $FE,$C0, "en mémoire :(" pause 5000 Return Endif if Battery_Cycle_Charge_Counter > 0 then ' Only display if there is something in the array. Show the time for 10 seconds, if PORTB.3 is not press then go back to Mainloop BCCC = Battery_Cycle_Charge_Counter Counter = 0 While BCCC != 0 While PORTB.3 != 1 'Hold the time on LCD until 'NEXT' button is pushed again or max 10 seconds lcdout $FE,1, " Charge time: " dec Counter lcdout $FE,$C0, dec Voltage_Array_Charge_time_RTCDay[Counter]," jour ",dec Voltage_Array_Charge_time_RTCHour[Counter],dec Voltage_Array_Charge_time_RTCMin[Counter],dec Voltage_Array_Charge_time_RTCSec[Counter] pause 1000 Gosub Hold_menu_1 'Pause until PORTB.3 != 1 ..or ten seconds Wend BCCC = BCCC - 1 Counter = Counter + 1 Wend if Battery_Cycle_DisCharge_Counter > 0 then ' Only display if there is something in the array. Show the time for 10 seconds, if PORTB.3 is not press then go back to Mainloop BCCC = Battery_Cycle_DisCharge_Counter Counter = 0 While BCCC != 0 While PORTB.3 != 1 'Hold the time on LCD until 'NEXT' button is pushed again or max 10 seconds lcdout $FE,1, " DisCharge time: " dec Counter lcdout $FE,$C0, dec Voltage_Array_DisCharge_time_RTCDay[Counter]," jour ",dec Voltage_Array_DisCharge_time_RTCHour[Counter],dec Voltage_Array_DisCharge_time_RTCMin[Counter],dec Voltage_Array_DisCharge_time_RTCSec[Counter] pause 1000 Gosub Hold_menu_1 'Pause until PORTB.3 != 1 ..or ten seconds Wend BCCC = BCCC - 1 Counter = Counter + 1 Wend Else return Endif Gosub Hold_menu_2 endif Return '///////////////////////////// '/////// Hold_Menu_1 //////// '///////////////////////////// Hold_Menu_1: for i = 1 to 100 if PORTB.3 != 1 then Return Endif pause 100 next i Goto mainloop Here_to_return Return '///////////////////////////// '/////// Hold_Menu_2 //////// '///////////////////////////// Hold_Menu_2: for i = 1 to 100 lcdout $FE,1, " Waiting 10 sec. " lcdout $FE,$C0, "Or click next" pause 100 if PORTB.3 != 1 then goto Mainloop next i Goto Mainloop Return




Bookmarks