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...
you have set timer1 to overflow every 16.38 mS , you never count the overflows
also adding 65535 to a word var seems very odd do you actually intend to subtract 1
Re: How to measure how long I pressed a button ?
a bit fancier
richard Today, 12:03#CONFIGcfg = _INTRC_OSC_NOCLKOUT
cfg&= _WDT_ON
cfg&= _PWRTE_OFF
cfg&= _MCLRE_ON
cfg&= _BODEN_ON