Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <htc.h>
//Set Internal Oscillator with 4MHz freq
//Disable WatchDogTimer and Brownout Reset
//Disable code protection
//Enable MCLR
__CONFIG( MCLREN & UNPROTECT & BORDIS & WDTDIS &PWRTEN & INTIO);
void main()
{
TRISIO = ~(1<<1);
while(1)
{
GPIO1 = 1;
}
}
Note: The ANSEL (9Fh) and CMCON (19h)
registers (9Fh) must be initialized to
configure an analog channel as a digital
input. Pins configured as analog inputs will
read ‘0’. The ANSEL register is defined for
the PIC12F675.
GPIO = 0x00; // Initialize GPIO
CMCON = 0x07; // Disable Comparator
ANSEL = 0x00; // Disable ADC
TRISIO = 0x00; // Set all I/O as outputs
what do you mean?But, I am still worried about the PIC12F part....it is as good as tristate?
Also, one more thing I realized when connected Ammeter is that base current is more than Collector current in my circuit. In simulator, can I change the current capacity of the source to make the design accurate/perfect?