Do you see any mistakes????

Status
Not open for further replies.

_ab

New Member
Dear friends i built this circuit and its not working.Do you see any mistakes???Any help would be appriaciated....
 

Attachments

  • alarm.gif
    5 KB · Views: 146
  • alarm1.c
    600 bytes · Views: 100
  • relay_Alarm.gif
    1.9 KB · Views: 133
Code:
    TRISA=1;   // makes all PORT A inputs
This instruction sets only RA0 to input.

The switch is not connected properly, it needs a pull-up resistor.

Have you selected "XT" as the oscillator type?
 
But an important point is missed, eng1. See image.
 

Attachments

  • relay_Alarm.gif
    7.2 KB · Views: 154
Dear friends thank you all for your help.Well the relay was my mistake in the schematic but i had tested it right on the bread board.So you told me that i need a pull up resistor.You mean the following attachment???And what changes should i do to make RA1,2,3 as inputs????Also i forgot to mention that my setting to ic-prog were: pwrt on xt osc

Thanks a lot again and my Best regards.....
 

Attachments

  • alarm2.GIF
    6.4 KB · Views: 128
Last edited:
I'm sorry if I've missed anything but that looks alright to me.

Just for future reference. . .
It can some times take a few of days for someone to reply to a thread. Please try to be more patient, if you don't receive a reply within a week then try bumping the original thread by making an additional post with more information about what you are trying to do.

If you don't receive any replies to a thread then please don't take it personally. For all you know people might not actually know the answer but it's far more likely that you haven't provided enough information.
 
If you move the input switches to PORTB you might be able to omit the 10K pullups (PORTB has RB_PU weak about 47K pullups built in as an option) also increase your reset pullup to 10K if you want to use an ICP.
Also if you want to save a few cents use an RC osc or resonator with built in caps to replace the crystal.

PS you will need a pull-down resistor on the deactivate switch... Or connect it to ground and use a pull-up.
 
Last edited:
_ab said:
And what changes should i do to make RA1,2,3 as inputs????
Code:
TRISA = 255;     // 255 = 0b11111111; set PORTA to all input

I suggested a pull-up resistor on RA0. See the schematic below. When the switch is open, a logic "1" appears on RA0; when the switch is closed, a logic "0" appears on that input.

If you have questions about the other inputs, give details about your sensors.
 

Attachments

  • Image1.png
    4.7 KB · Views: 118
ok thank you all i will try it and i will tell you my results.Sorry if i was impatient....


Best Regards
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…