I am trying to recreate the following scenario.
Setup is the following:
RA1-Motion Sensor (I am using a button), RA0 Activate System button, RA5 Buzzer RB5-Red alarm set, RB4-Green system off
The following is what program should do:
Green light blinks 1/10 of a second while system unarmed (RA1 has not been pressed)
Once RA1 is pressed, green light stops blinking and red light starts blinking at 1/10 second intervals
If RA1 is pressed (motion sensor), alarm sounds on RA5
My problem follows:
1) When ANSEL <1,0> is set and TRISA <1,0> is set, the MPLab Simulator can not set RA0 high.
2) When ANSEL <1,0> is cleared and TRISA <1,0> is set, the MPLab Simulator will set RA0 high.
When PIC16F690 is programmed using example number 2 from above, RA0 does not appear to accept a 5 volt input. It does not switch the blinking green light to a blinking red light.
What am I doing wrong?
Setup is the following:
RA1-Motion Sensor (I am using a button), RA0 Activate System button, RA5 Buzzer RB5-Red alarm set, RB4-Green system off
The following is what program should do:
Green light blinks 1/10 of a second while system unarmed (RA1 has not been pressed)
Once RA1 is pressed, green light stops blinking and red light starts blinking at 1/10 second intervals
If RA1 is pressed (motion sensor), alarm sounds on RA5
My problem follows:
1) When ANSEL <1,0> is set and TRISA <1,0> is set, the MPLab Simulator can not set RA0 high.
2) When ANSEL <1,0> is cleared and TRISA <1,0> is set, the MPLab Simulator will set RA0 high.
When PIC16F690 is programmed using example number 2 from above, RA0 does not appear to accept a 5 volt input. It does not switch the blinking green light to a blinking red light.
What am I doing wrong?