|
confused
12 posts
 Popping In
|
08-11-2010 19:44
hi port B is an 8 bit Port so when you write movelw 0b00000000
THere are 8 Zeros
Then port C is a 7 bit wide in the course its written as
0b00000000 again 8 zeros
The same as an 8 bit wide , But surely it should be written as
0b0000000 eg 1 less i notice that FLow code does not care, it works both way ,but could some one let me know what the convention is
Thanks Peter
|
|

GeenBert
64 posts
 Frequent Visitor
|
08-11-2010 23:38
Port C is 8 bits wide. Pin c3 doesn't exist but c0,c1,c2 and c4 up to and including c7 do exist. So you need 0b00000000 where the 4th bit technically has no function.
If you use 0b0000000 for port C Flowcode does care: the 8th bit is simply not set. If it happens to be zero by default you may not notice this.
|
|
confused
12 posts
 Popping In
|
09-11-2010 16:20
Hi thanks but could you let me know why the data sheet discribes port C as 7 bit wide
Regards Peter
|
|
confused
12 posts
 Popping In
|
09-11-2010 16:33
Hi again when you look at the block diagram although it only shows 7 outputs it cleary show RC0 to RC7 8bits wide
Thanks Regards Peter
|
|

Arjen H.
1075 posts
 Power User
|
09-11-2010 17:06
From the datasheet:
In PIC18F2455/2550/4455/4550 devices, the RC3 pin
is not implemented.
So port C only has 7 pins (7 pins wide), but you should address it as 8 bit. The RC3 bit is ignored (0 or 1, it does not matter...).
|