PDA

View Full Version : odd 2550 behaviour



f_lez
- 3rd November 2006, 09:59
I mistyped this in a program ( I quickly wanted to blink an LED on portA)

high porta.1
pause 500
high porta.0
pause 500
high porta.1
pause 500
high porta.0
pause 500
high porta.1
pause 500
high porta.0
pause 500

See the problem, they all should be portA.0, so in theory the LED on PortA.1 should light, slight pause, then the LED on PortA.0 should light.

Ha, no it doesnt, well OK it does BUT the first led (on PortA.1) goes out, and instead of 2 leds being on, I get alternating leds ????

Ie

01
10
01
10

I expected

01
11


(edit)

'alldigital' fixed it so I must have one of those damn 'con' keywords wrong.....

Raflex
- 4th November 2006, 03:15
I mistyped this in a program ( I quickly wanted to blink an LED on portA)

high porta.1
pause 500
high porta.0
pause 500
high porta.1
pause 500
high porta.0
pause 500
high porta.1
pause 500
high porta.0
pause 500

See the problem, they all should be portA.0, so in theory the LED on PortA.1 should light, slight pause, then the LED on PortA.0 should light.

Ha, no it doesnt, well OK it does BUT the first led (on PortA.1) goes out, and instead of 2 leds being on, I get alternating leds ????

Ie

01
10
01
10

I expected

01
11


(edit)

'alldigital' fixed it so I must have one of those damn 'con' keywords wrong.....

You have a mistake, need to use low to turn off.

f_lez
- 5th November 2006, 00:38
Yes I had, but that was not the reason for the post, if you had read it...........

Melanie
- 5th November 2006, 03:09
If 'alldigital' fixed it, then you're on the wrong forum!

f_lez
- 6th November 2006, 08:59
Ok I add 'alldigital' to my code and I compile and it works, but its not a supported command.......


Scary........


Ok save the hex, recompile without the 'alldigital' and compare the hex, no difference............

Damn these chips!

I'll just go sit in a corner for a while and rock back and forth.

sayzer
- 6th November 2006, 10:47
f_lez,

To make it clear, "alldigital" is not a command of PBP's.

It is a command of another compiler.

Thus, one should avoid posting "things" about another compiler on this forum.

That is what Melanie kindly meant.


--------------------------------

claxon1
- 6th November 2006, 20:31
chill down sayser,

and read the posts carefully.

ps:

I'm sure if Melanie would need a parrot she'll buy one

cheers

mister_e
- 6th November 2006, 23:47
i suggest our friend open the PIC datasheet in section 21(analog converter) and 22(analog comparator)

From there, you have to find how to disable AllAnalog stuff to make your i/o AllDigital.

Claxon1... you should read and write better the name of Sayzer :D

Archangel
- 7th November 2006, 04:28
Ha, no it doesnt, well OK it does BUT the first led (on PortA.1) goes out, and instead of 2 leds being on, I get alternating leds ????
....
This could be your code doing this, or if you have an unstable ground and mishmatched LEDs it will also behave this way. Certainly you have some code issues, I just wanted to remind you of the other posibility. Sometimes it is the hardware. A pic which has suffered an ESD will often behave badly as well.
Cheers
JS

sayzer
- 7th November 2006, 08:51
chill down sayser,

and read the posts carefully.

ps:

I'm sure if Melanie would need a parrot she'll buy one

cheers



(let be it)

f_lez
- 7th November 2006, 09:03
Ok lets take all the comments in no particular order...........

The pic could be faulty, but I doubt it as its running fine now, maybe it did not program correctly but it should have 'verify failed', maybe it did and I was so rushing and never noticed that. possible.

I get bogged down in the data sheets so I often just look at code examples and try things, possibly not most efficient but a better learning process than reading a monitor, which I hate, I'm a paper person, I cant read online books, I cant watch online movies, I need a big screen and cocoa.........

As to quoting commands form other compilers, it was in a code example I came across via Google, website unknown, I did not know it was from another pic basic.

Mel, I took what she said in the fun (I hope!) way it sounded to me, get a life people and dont take it serious, I didnt!

I'm sure if she wanted to 'scold' me she could quite venomous if needed!
(its in the eyes, look at the picture, trust me I knew a woman with eyes like that, one each side, lovely to stare into over a movie, but just try and take the last cookie.....)