i have a pic 12f629 and i can't get it to go high on GPIO1 or GPIO2 or any GP for that matter.
my code is :
would appreciate any help ..
my code is :
Rich (BB code):
#include <htc.h> /* HiTech General Include File */
#endif
#include <stdint.h> /* For uint8_t definition */
#include <stdbool.h> /* For true/false definition */
#include <stdio.h>
#include <stdlib.h>
#include <pic.h>
#include "system.h" /* System funct/params, like osc/peripheral config */
#include "user.h" /* User funct/params, such as InitApp */
#define _XTAL_FREQ 4000000
/******************************************************************************/
/* Main Program */
/******************************************************************************/
__CONFIG(FOSC_INTRCIO & BOREN_ON & CP_OFF & MCLRE_ON & WDTE_OFF & PWRTE_OFF & CPD_OFF);
//__CONFIG(IOSCFS_4MHZ & WDTE_ON & PWRTE_ON & MCLRE_ON & BOREN_OFF & CP_OFF);
void main(void)
{
TRISIO = 0b000000; //GP1 LED ONLY
INTCON = 0x0; /* disable all interrupts */
CMCON = 0x0; /* turn off comparators */ tried also CMCON=0x7;
GPIO = 0b000111;
for(;;){;}
}
Last edited by a moderator: