Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

12f675

Status
Not open for further replies.

YAN-1

New Member
Hello everyone. I am trying to write a very simple program using the 12F675. I am using HITECH C language under MPLAB and I'm using the PICKIT1 (the rfPIC12f675 development PIC) to burn the program on the PIC. But for some reason, it's not working. All the program does at this point is light 3 LEDs! Here's the code. The configuration word is such that I use a 20MHz crystal and everything else is OFF or disabled. I made sure to turn off the ADC module but what I'm getting on all output pins is noise (floating logic). Where did I go wrong?

#include <pic.h>
#include "htc.h"
__CONFIG (0x3192);

void main() {

ANSEL = 0x00;
ADCON0 = 0x00;
TRIS0 = 0;
TRIS1 = 0;
TRIS2 = 0;


GPIO0=1;
GPIO1=0;
GPIO2=1;

}
 
I have not used this processor but can give you some pointers.

If you are not executing your code you either have a bad power or crystal connection, or a bad __CONFIG () value.

see Hi-Tech code "LED Blinker for HOODMICRO"


Schematic used by above can be found on the same site.

Support forum for Hi-Tech Lite compiler
https://www.htsoft.com/forum/all/ubbthreads.php

HTH
3v0
 
Try turning off the comparators:
CMCON = 0x07;
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top