i know nothing about ancient history
and the number is word sized anyway
Thank you very much !!! I can't wait to test it at the weekend !
LE : I use PBP 2.5, so TimerReload CON 61637 = WARNING Line 10: 111001 Numeric overflow, value truncated.
a bit fancier
#CONFIGcfg = _INTRC_OSC_NOCLKOUT
cfg&= _WDT_ON
cfg&= _PWRTE_OFF
cfg&= _MCLRE_ON
cfg&= _BODEN_ON
the chances of AI finding well written pbp code to plagiarize from are slim at best.
afaics AI can only write code if it can plagiarize it from somewhere, the code only works if the stolen code...
It works ! Finally, the first program that shows me the duration. BUT .... the correct identification of the pressed button does not work ! I pressed ONLY button 0 : short or long ...It doesn't...
fratello Today, 10:53No, I did not forget to add a label.
EXIT is a keyword used to break out of the current loop.
AI, simulation, virtualization.... What happened to the good old breadboard?
Do I really need to...
forget Proteus.
Also I think Henrik forgot to add the label Exit: just before the Serout command.
Ioannis
Thanks !
But nothing on serial ...(in Proteus 8)
What happens if more than one button is pressed at the same time?
Anyway, this might serve as starting point. It compiles but it is not tested.
Long_Press CON 5000
Short_Press con 100
cnt...
Qualifying Compiler |
Upgrade Description | |
Upgrade PICBASIC PRO (PBP) 2.60 or later to PBP3 Gold Edition | ||
|
||
|
||
Upgrade PICBASIC Compiler (PBC) to PBP3 Silver Edition |
Re: How to measure how long I pressed a button ?
Mea culpa ... I identified and corrected the errors.9654
fratello Today, 12:33