|
Try this...
Posted by Joe Johnson at 03/12/2001 12:57 PM EST
Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.
In Reply to: NEED HELP with Delay loop for compressor relay switch
Posted by Erik on 03/12/2001 11:54 AM EST:
pressure var rc_swX.bitX
pump_on var relayX.bitX
DELAY_COUNT CON 40
cnt var byte
'assumes delta_t is used
cnt = 0
mainloop:
'get data from master CPU
cnt = (cnt + delta_t) * (1 - pressure) MAX DELAY_COUNT
if (pressure = 1) or (cnt
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|