PDA

View Full Version : $90 is not equal to %1001000?



flotulopex
- 26th August 2006, 16:42
Hello,

I'm new to PICs.

Starting with some simple examples, I don't understand why, for example:

INTCON = $90 works

when

INTCON = %1001000 doesn't.

What is the difference?

Flotul

keithdoxey
- 26th August 2006, 16:52
Hello,

I'm new to PICs.

Starting with some simple examples, I don't understand why, for example:

INTCON = $90 works

when

INTCON = %1001000 doesn't.

What is the difference?

Flotul

Your binary example has a ZERO missing

If you take of the bit that you think is "9" (1001) then you are left with "000" not "0000"

The effect of that is that instead of being treated as 1001 0000 which should be $90 it gets treated as "100 1000" which is $48

HTH

flotulopex
- 26th August 2006, 17:08
Well,

If I can't count up to eight, I should better stop right now :-)

Thanx a lot.

keithdoxey
- 26th August 2006, 18:28
Well,

If I can't count up to eight, I should better stop right now :-)

Thanx a lot.

Dont worry.... its only the first of many mistakes that you will make :)

muddy0409
- 27th August 2006, 04:49
Yeah, there will sure be some doozys that make you wonder if you know anything at all....most will be plain and simple. This forum will be of great assistance to you, as it has been to me, on those occasions when I have deemed myself too stupid to figure something out and to ask someone. My after thoughts usually start with..."oh yeah, damn, why didn't I think of that?????"