R&DElec
Newbie level 5
Hello,
I am trying to program a PIC10F206 using pikit4+ MPLAB X IDE v6.05 and C8 compiler. I am super new in this field and I am facing a problem when I programmed the pic I only get 2.7 volt in my output pins. the program is super simple because I'm just trying to figure out why I am not receiving 5 volt at out put.
the pic is connected to 5v so pin2 is connected to 5v, pin 7 connected to ground, pin 8 connected to vdd MCLR(this was was suggested but it did not help), my pin 6 is GPO0 and is my input and pin 5 is my GPO1 my output and Pin4 GPO2 is my out put as well.
i also tried connecting an led and a 220 resistor at the outputss and then i used the multimeter to measure but nothing is helping
[ MODERATOR ACTION: Added 'C' Syntax tag ]
I am trying to program a PIC10F206 using pikit4+ MPLAB X IDE v6.05 and C8 compiler. I am super new in this field and I am facing a problem when I programmed the pic I only get 2.7 volt in my output pins. the program is super simple because I'm just trying to figure out why I am not receiving 5 volt at out put.
the pic is connected to 5v so pin2 is connected to 5v, pin 7 connected to ground, pin 8 connected to vdd MCLR(this was was suggested but it did not help), my pin 6 is GPO0 and is my input and pin 5 is my GPO1 my output and Pin4 GPO2 is my out put as well.
i also tried connecting an led and a 220 resistor at the outputss and then i used the multimeter to measure but nothing is helping
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 #pragma config WDTE = OFF // Watchdog Timer (WDT disabled) #pragma config CP = OFF // Code Protect (Code protection off) #pragma config MCLRE = OFF // Master Clear Enable (GP3/MCLR pin function is digital I/O, MCLR internally tied to VDD) #include <xc.h> #define _XTAL_FREQ 4000000 void main(void) { // Set GP0 as input and GP1 as output TRIS = 0b1001; // GP1 as output and GP0 as input while(1) { // Check if GP0 is high if(GPIObits.GP0) { // Set GP1 high GPIObits.GP1 = 1; GPIObits.GP2 = 1; } else { // Set GP1 low GPIObits.GP1 = 0; GPIObits.GP2 = 0; } } }
[ MODERATOR ACTION: Added 'C' Syntax tag ]
Last edited by a moderator: