![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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; }
__________________ World.......behold........YAN is coming | |
| |
| | #2 |
|
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" http://www.k9spud.com/hoodmicro/devel/blink.c Schematic used by above can be found on the same site. Support forum for Hi-Tech Lite compiler http://www.htsoft.com/forum/all/ubbthreads.php HTH 3v0 | |
| |
| | #3 |
|
Try turning off the comparators: CMCON = 0x07;
__________________ Inside every little problem, is a big problem trying to get out. | |
| |
|
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| A/D with pic 12f675 | ndspinney | Micro Controllers | 8 | 23rd December 2006 10:55 AM |
| 12F675 GPIO.3 help. | mramos1 | Micro Controllers | 8 | 5th September 2006 12:22 PM |
| Cannot read 12F675 with ICSP | dprischak | Micro Controllers | 4 | 1st June 2006 03:37 AM |
| 12F675 Input problems | Jerran | Micro Controllers | 5 | 3rd February 2004 04:29 PM |
| 12F675 Problem | brodin | Micro Controllers | 10 | 29th December 2003 10:40 PM |