why the redundant extra schmitt trigger?followed by a 74HC14,
in the pic 16F1885x family all input pins are ST by default unless you clear the INPUT THRESHOLD CONTROL bit in the INLVLx register
why the redundant extra schmitt trigger?followed by a 74HC14,
in the pic 16F1885x family all input pins are ST by default unless you clear the INPUT THRESHOLD CONTROL bit in the INLVLx register
Warning I'm not a teacher
Last edited by Demon; - 30th August 2024 at 01:31.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
unfortunately one of the very few enhanced core pic chips without INPUT THRESHOLD CONTROL.Because I started development using a 16F1937
Warning I'm not a teacher
193x was a nice chip in its time but now comparing to 188xx seems so old...!
And I have many in stock...
Ioannis
Registers associated with Interrupts are in Table 7-1 on p. 153:
From my observations, you need 2 entries in the DEFINES for 16F:
- Result bit,
- Enable bit.
#DEFINE {DT-INT interrupt NAME} {result flag REGISTER}, {result flag bit}, {enable bit REGISTER}, {enable bit}
For example:
#DEFINE IOC_INT PIR0,IOCIF, PIE0,IOCIE
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
I keep the IOC flags right alongside the pin definitions (this is a EC11-type rotary encoder; 2 shafts + pushbutton):
It makes it easier (for me) to make sure things are connected exactly where I think they are. It's also much easier to move things about on the pins.Code:;--- Setup pins ---------------------------------------------------------------- COM1_MHz_WiperA var PortA.2 ' Outer IOC_COM1_MHz_WiperA_flag var IOCAF.2 ' IOC flag COM1_MHz_WiperB var PortA.3 ' Outer IOC_COM1_MHz_WiperB_flag var IOCAF.3 ' IOC flag COM1_KHz_WiperA var PortA.0 ' Inner IOC_COM1_KHz_WiperA_flag var IOCAF.0 ' IOC flag COM1_KHz_WiperB VAr PortA.1 ' Inner IOC_COM1_KHz_WiperB_flag var IOCAF.1 ' IOC flag COM1_SPST var PortA.4 ' Swap IOC_COM1_SPST_flag var IOCAF.4 ' IOC flag
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Bookmarks