Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Switched LED

Switched LED

Use a switch to change the signal on a port, and turn the LED on and of based on that signal. A simple on off switch done the difficult way.
The 12F675 has pins that can either be digital or analog. If the port is not set to digital the input signal is always 0. It took many many hours and suggestions from Stef and Wouter before I managed to get that right. It’s done like this:

First the right addresses need to be obtained from the 12F675 data sheet. Now if you look at the data sheet you’ll see that the address for CMCON is 19h, while I use 1F. I copied this value from Wouter’s fader (for the 16F628 actually) and it worked ok. I have no idea why.

Visit Here for more.

 

More Articles to Read

ESP8266 Weather Station Projects
ESP8266 Weather Station Projects
Free PCB coupon via Facebook to 2 random commenters
Free PCB coupon via Facebook to 2 random commenters
Single tube Lethal Nixie clock
Single tube Lethal Nixie clock
How to make a simple 1 watt audio amplifier (LM386 based)
How to make a simple 1 watt audio amplifier (LM386 based)
Flashing Binaries to DRA7xx Factory Boards Using Device Firmware Upgrade
Flashing Binaries to DRA7xx Factory Boards Using Device Firmware Upgrade
Dot² isn’t your typical coffee table
Dot² isn’t your typical coffee table
Debugging ARM Cortex-M0+ HardFaults
Debugging ARM Cortex-M0+ HardFaults
EMP Jammer build
EMP Jammer build
A 3D-printed e-drum pad
A 3D-printed e-drum pad
Interactive geodesic LED dome = extreme geometric fun!
Interactive geodesic LED dome = extreme geometric fun!

Top




Shares