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.

Trouble starting Pic programming in Basic

Status
Not open for further replies.

Jerran

New Member
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 ;)
 

Jerran

New Member
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.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top