PDA

View Full Version : 10F206 Problem



Tobias
- 22nd August 2007, 14:59
First time using a 10F.

When I send this code to a 18F877A, it works fine. However the output stays high when I send to a 10F206.


Output GPIO.3

Loop:
High GPIO.3
Pause 100
Low GPIO.3
Pause 100
Goto Loop

At first I looked at the output, while the PIC10F was placed on the board I made. The output was staying high. This is the first time using the new board. So I took another 10F, placed into my 10F adapter programmer and programmed the PIC. Then I found the output pins on the back of the adapter along with the power and ground pin. I power up the 10F while still in the adapter using VDD and VSS from my LAB-X1 board. I watch the outputs with my scope and again the output stays high. So this pretty much told me its not a problem with my new board and is a programming problem.

So then I took the same program, changed the output channel to PortB.5 and programmed a 18F877A with the same program. Watched the output while still on the X1 and it toggles.

What am I missing with the 10F?

Thank you in advance
Toby

Melanie
- 22nd August 2007, 15:15
>What am I missing with the 10F?

You're missing the DATASHEET which tells you that GPIO.3 is an INPUT ONLY pin.

Tobias
- 22nd August 2007, 17:02
I have tried it with 0-2 also.

output GPIO.0
output GPIO.1
output GPIO.2

Loop:
High GPIO.0
High GPIO.1
High GPIO.2
Pause 100
Low GPIO.0
Low GPIO.1
Low GPIO.2
Pause 100
Goto Loop

The outputs stay low all the time. I am assuming that I can just power up the 10F through the back of the 10F adapter using the LabX-1 as the power supply.

Melanie
- 22nd August 2007, 17:36
And you have of course verified that your PIC is actually working, you've got volts where you should have them, and you've programmed it for the correct Oscillator and MCLR usage?

Here's an example of PBP code that works for you to compare in case you've missed anything in the PICs initialisation... btw... it's a good idea to use TRISIO to configure your PICs pin I/O before you use it.

http://www.picbasic.co.uk/forum/showthread.php?t=3510

Tobias
- 22nd August 2007, 18:41
I can program the PIC, checked voltage etc.

Thank you for the input. I tried first to copy and paste the entire 'Dice' program. I am using MicroCode Studio Plus 3.0 with PBP 2.47. I received three 'Warnings' (Illegal OpCode) and three 'Errors' (Found label after column1) when I tried to compile for a 10f206. I commented out the three @ Device pic10f206 lines and the code then compiled ok. Is there a setup option to allow these statements to compile?




And you have of course verified that your PIC is actually working, you've got volts where you should have them, and you've programmed it for the correct Oscillator and MCLR usage?

Here's an example of PBP code that works for you to compare in case you've missed anything in the PICs initialisation... btw... it's a good idea to use TRISIO to configure your PICs pin I/O before you use it.

http://www.picbasic.co.uk/forum/showthread.php?t=3510

Melanie
- 22nd August 2007, 18:49
I don't use Microcode studio... generally find these things more of a pain than they are help... the program will compile with the command line...

pbp -p10f206 dice -v

The @ device statements only apply if you're using the native MeLabs assembler.