View previous topic :: View next topic |
Author |
Message |
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
Problem with the ports of 18F2550 |
Posted: Mon Sep 10, 2012 4:27 am |
|
|
Greetings! I`m using 18F2550 to control a few 74LS373 buffers. I`m using port C as data port and port b an some pins of port a like access signals. But here is the problem. I saw in the datasheet pins B3 and C1 has common function - CCP2. And this disturbs the work of my chart. When I output a specific data on port C (when I`m using PIN C1) it turns on 2 of my buffers - 1 which I have chosen and 1 extra.
What can I do to prevent this???
How to stop this extra functions??
Thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Mon Sep 10, 2012 4:38 am |
|
|
The CCP won't cause this.
It only ever routes to _one_ of the pins. There is no 'common function', the routing is selectable in the fuses. However provided the CCP is off, it won't do anything:
setup_ccp2(CCP_OFF);
However this is not the problem. Other things possible:
C1, is also the USB transceiver enable. USB defaults to off. You are not loading any USB code, or you are sure this is set to use the internal transceiver?.
C1, is alo one of the two pins that form the timer1 oscillator. You have got timer1, either set to use 'T1_INTERNAL', or disabled?.
You have a whisker short between the pins. Very common.
What are the other pins involved?.
Best Wishes |
|
|
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
|
Posted: Mon Sep 10, 2012 4:49 am |
|
|
My mistake. I`m using port B as data port and ports A and C are access.
I`m using PINs - A3 and A2, C0,C1,C2,C6 and C7 as CS pins.
My chart works fine but when I output data contains only pins B3 and B4 it disturbs the chart.
I don`t use timers!
Best regards! |
|
|
|