Mad Professor
Senior Member
Good Day All.
I have been playing with PicAxe for some time now, only basic stuff.
I have now given my self a new project, and I am not sure where to start with the code, so I hope that you guys can help me out.
I want to build a little box to Generate pulses from 0.50 to 1.50ms in 0.05ms steps with a LCD Display and Interactive Menu.
I already have a box without LCD Display or Menu, when it's powered up it just pulses 3ms for (x)time then 6ms for (x)time, and so on upto 12ms, then stops.
If possible I would like to use a 20x2 LCD Display from TechSupplies, and four press buttons to access the menu, (Select, Cancel, Left, Right).
When the unit is powered up I would like it to do the following.
Display
Manual Control
Automatic Control
Manual Control
Pulse: 1.50ms 50% DC
------------------Run
Automatic Control
Start Range: 0.50ms
-----------------Next
--------------------
End Range: 1.50ms
------------------Run
As I have not worked with LCD displays or any kind of Interactive Menus I need your help and advice on where to start.
Hardware should not be a problem for me, it's just the coding I am going to have problems with.
Here is the code I use for my current test box.
Thanks for your time.
Best Regards.
I have been playing with PicAxe for some time now, only basic stuff.
I have now given my self a new project, and I am not sure where to start with the code, so I hope that you guys can help me out.
I want to build a little box to Generate pulses from 0.50 to 1.50ms in 0.05ms steps with a LCD Display and Interactive Menu.
I already have a box without LCD Display or Menu, when it's powered up it just pulses 3ms for (x)time then 6ms for (x)time, and so on upto 12ms, then stops.
If possible I would like to use a 20x2 LCD Display from TechSupplies, and four press buttons to access the menu, (Select, Cancel, Left, Right).
When the unit is powered up I would like it to do the following.
Display
Manual Control
Automatic Control
Manual Control
Pulse: 1.50ms 50% DC
------------------Run
Automatic Control
Start Range: 0.50ms
-----------------Next
--------------------
End Range: 1.50ms
------------------Run
As I have not worked with LCD displays or any kind of Interactive Menus I need your help and advice on where to start.
Hardware should not be a problem for me, it's just the coding I am going to have problems with.
Here is the code I use for my current test box.
Code:
symbol Start_LED = 0 ‘
symbol Stop_LED = 1 ‘
symbol Pump = 2 ‘
symbol Inj_1 = 3 ‘
symbol Inj_2 = 4 ‘
symbol Inj_3 = 5 ‘
symbol Inj_4 = 6 ‘
Main: ‘
low 0,1,2,3,4,5,6,7 ‘ All Outputs Off.
high Start_LED ‘ Start Button LED On.
if pin6 = 1 then C_30 ‘
goto main
C_30: ‘
low Start_LED ‘ Start Button LED Off.
high Stop_LED ‘ Stop Button LED On.
for b2 = 1 to 45 ‘ Loop whole lot 45 times (~30 mins)
for w0 = 1 to 1666 ‘ define loop for 1666 times (10 sec)
high Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 On.
pause 3 ‘ Pause for 3ms.
low Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 Off.
pause 3 ‘ Pause for 3ms.
next w0 ‘ end of loop.
w0 = 0 ‘
for w0 = 1 to 833 ‘ define loop for 833 times (10 sec)
high Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 On.
pause 6 ‘ Pause for 6ms.
low Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 Off.
pause 6 ‘ Pause for 6ms.
next w0 ‘ end of loop.
w0 = 0 ‘
for w0 = 1 to 555 ‘ define loop for 555 times (10 sec)
high Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 On.
pause 9 ‘ Pause for 9ms.
low Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 Off.
pause 9 ‘ Pause for 9ms.
next w0 ‘ end of loop.
for w0 = 1 to 416 ‘ define loop for 416 times (10 sec)
high Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 On.
pause 12 ‘ Pause for 12ms.
low Inj_1,Inj_2,Inj_3,Inj_4 ‘ Injector Bank 1,2,3,4 Off.
pause 12 ‘ Pause for 12ms.
next w0 ‘ end of loop.
next b2 ‘
low Stop_LED ‘ Stop Button LED Off.
goto main
Best Regards.
Last edited: