PIC12f675

Hello,

I would like to know if the PIC12F675 from microchip can control 2 LDRs, a buzzer, and a LED. I know it might sound a simple question but this is for my starting project with Microchip and C programming.

If it is possible I would appreciate if someone could tell me how to wire the components to the PIC.

Thanks, GranTotem

:D

The 12f6xx chips …

have 8 pins with a total of 5 i/o and 1 i when using the internal ‘crystal’ and an internal MCLR. There is no reason you could not connect the 4 items you have selected in a number of different ways. The PICAXE 08m chips are just 8 pin PICs.

LDR

Okay so,

5 of the pins are i/o so I can connect the LDR in any of those but, how do i wire them, just like I would in a picaxe using a resistor to ground and before it the connection to the pin?

 

Like birdmun said, your
Like birdmun said, your PIC12 micro is physically the same as a small PICAXE micro, only without the pre-loaded software (PICAXE bootloader).

The buzzer and LED can be connected to any generic I/O pin, but where you can connect the LDRs depends on what you need from them. If you just want an on-off behaviour, then any digital input capable pin is fine. If you want an analog reading however, you’ll need to make sure you connect it to GP0, GP1, GP2 or GP4, as these are the pins that can access the ADC.

You can configure the LDR as you’ve described, using a pull-down resistor, but you don’t really need the resistor going from the LDR/resistor voltage divider junction to the input pin. It won’t do you any harm to leave it in, except for slowing down the response to the LDR slightly, but LDRs are already slow so it’s not a big deal.