This is the first time I use a reactive component (a capacitor).
On the schematic, test_2a.sim1, the RC LPF (940K and 220pF) is simply used to set an interrupt flag (when necessary) at a zero crossing of the mains voltage (220V, 50Hz). At pin D3 (INT1 here) the high amplitude sinewave wave is clipped, after RC, by the MCU internal two diodes, one connected to Vcc and the other to GND). This produces a quasi-squarewave at that pin.
To just monitor the clipped voltage at pin D3, an infinite loop was added to the previous ‘test_1.asm’ at its beginning. This lets the remaining instructions out of reach. The new attached asm is ‘test_2a.asm’.
I wonder what the optimum settings could be in order to monitor properly the signal at pin3. Although I have the impression that this is somehow a silly question, I like to save time for other tests.
Please note that the circuit of test_2a.sim1 is just a small part of a bigger one after removing all other parts.
On the schematic, test_2a.sim1, the RC LPF (940K and 220pF) is simply used to set an interrupt flag (when necessary) at a zero crossing of the mains voltage (220V, 50Hz). At pin D3 (INT1 here) the high amplitude sinewave wave is clipped, after RC, by the MCU internal two diodes, one connected to Vcc and the other to GND). This produces a quasi-squarewave at that pin.
To just monitor the clipped voltage at pin D3, an infinite loop was added to the previous ‘test_1.asm’ at its beginning. This lets the remaining instructions out of reach. The new attached asm is ‘test_2a.asm’.
I wonder what the optimum settings could be in order to monitor properly the signal at pin3. Although I have the impression that this is somehow a silly question, I like to save time for other tests.
Please note that the circuit of test_2a.sim1 is just a small part of a bigger one after removing all other parts.
- Attachments
test_01_ATmega8_4.zip
- You don't have permission to download attachments.
- (42 Kb) Downloaded 1 times