lbenson
Senior Member
I'm using an LTV-814 AC opto-isolator chip to monitor a 24VAC furnace control line. Here is the schematic.
I'm running the 08M2 at 16mHz in order to be able to have the 9600 baud rate needed for the LCD.
I have a couple of questions.
1. The count that I'm getting is 30. Is that really the count for 250 milliseconds because I'm running at 16mHz instead of 4? (As I understand it, the LTV-814 conducts (above the threshhold) on both the positive and negative half-cycles, so the count per second would be 120.)
2. Is there an easy way with hardware to make this give a reading of "1" until the circuit is no longer conducting? (But what's easier than software--"count 1,1000,w6" as opposed to "if pin1 = 1 then"?)
Code:
24VAC ---------o o--------5V
xformer--10K---o o--1K--o--------08M2 count 1,1000,w6
LTV- | |
814 10K LCD (T9600_16)
|
0V
I have a couple of questions.
1. The count that I'm getting is 30. Is that really the count for 250 milliseconds because I'm running at 16mHz instead of 4? (As I understand it, the LTV-814 conducts (above the threshhold) on both the positive and negative half-cycles, so the count per second would be 120.)
2. Is there an easy way with hardware to make this give a reading of "1" until the circuit is no longer conducting? (But what's easier than software--"count 1,1000,w6" as opposed to "if pin1 = 1 then"?)