![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Greetings all, Im having a problem getting any code Ive written to work on a 12F675. Im using PicBasic Pro to compile in the MPLABS IDE. Im also programming threw the USB PicKit 1. The kit came with a few tutorials that I can get to work(used to verify that the internal clock was indeed running) but I cant get anything I write and compile into HEX to do anything. Ive tried simple: loop: High 1 Pause 1000 Low 1 Pause 1000 Goto loop or loop: GPIO.1 = 1 Pause 1000 GPIO.1 = 0 Pause 1000 Goto loop and a few other simple variants and cant get an led to light. My leds polarity is correct, also the tutorial programs do alot of things with 8 leds on the evaluation board that all work properly. Ive configured the compiler and MPLAB as stated on their site so Im guessing that I dont have something inside the IDE right. Ive picked the proper chip, and programmer from the MPLABs drop downlists. Any help or advice will be greatly appreciated. <EDITED> I changed gpio's to pin 1, previously I used 3 as an example but pin 3 is a dedicated input so might cause some confusion | |
| |
| | (permalink) |
| kk found part of my problem. I can get correct output on pins now with the Low and High command (low 1) but why doesnt the GPIO.1 = 1 work? It isnt a huge problem that I cant work around but from what Ive read it should work on my PIC. | |
| |
| | (permalink) |
| You need to set the ports TRIS to configure the pins as outputs. | |
| |