Custom interrupt for comparator for 16F628A

A collection of posts and articles on getting started in Flowcode v6

Moderator: Benj

Post Reply
skquah
Posts: 39
Joined: Fri Dec 12, 2014 3:57 pm
Has thanked: 26 times
Been thanked: 10 times
Contact:

Custom interrupt for comparator for 16F628A

Post by skquah »

Hello,
1) I have searched thru' the above topic in the forum and read thru' Dave Squibb and Jan. Lick forum discussion, back in Feb. 2016 & 2015..
2) My interest on the above comparator is quiet similar to Dave Squibb discussion forum..
3) Anyway, I still cannot figure-out how to put this comparator in my Gas sensor project.. I am seeking help if anyone can add-in the 'c' code and
the custom interrupt code for the comparator application..
4) To brief my gas sensor MQ5 project, I used 7 dip-switch connected to the chip serve as timer select for 17 min. to 24 min. .. The Gas sensor Aout
is connected to RA1 (Vin-) and RA2 is connected to external voltage reference.. The RA4 (C2 OUT) is to flash the gas detection LED.. The buzzer
is connected to RA0 then to the transistor driver..
5) I am attaching my (i) V6 flow-code project and (ii) schematic circuit for your attention.. Thank you, skquah.
Attachments
Gas Sensor.PNG
Gas sensor MQ5 circuit
(35.42 KiB) Downloaded 2226 times
Gas sensor _16F628A.fcfx
V6, flow-code
(48.77 KiB) Downloaded 265 times

skquah
Posts: 39
Joined: Fri Dec 12, 2014 3:57 pm
Has thanked: 26 times
Been thanked: 10 times
Contact:

Re: Custom interrupt for comparator for 16F628A

Post by skquah »

Hello, all
1) I missed out some information for your understanding.. That is this project is actually detecting the gas leaking of the gas stove while boiling
water and the 7 way dip-switch is to select the kettle timer to match the boiling pot water and it is connected to RB7..
For RB6, it is used (I) to flash during power up for 30 second to let the gas sensor to heat up and stable, also (ii) to light up when gas sensor
sense.. Thank you.. skquah

Post Reply