
Originally Posted by
Darrel Taylor
Then you would change the PORTL and or PORTH assignments in the .bas file for the chip you are using.
PORTL and PORTH determine which ports are used for "Pin Numbers".
PORTL is 0-7
PORTH is 8-15
<br>
Hi Darrel,
I have looked in the .bas file for the 18F452 and located the following code
Code:
PORTL VAR PORTB
PORTH VAR PORTC
TRISL VAR TRISB
TRISH VAR TRISC
Would I be correct in assuming that you also have to "adjust" the TRISL and TRISH aliases as well?
I take it that the ports dont have to be consecutive so that I could put
Code:
PORTL VAR PORTB
PORTH VAR PORTD
TRISL VAR TRISB
TRISH VAR TRISD
Which would give me 0-7 = PortB.0-PortB.7 and 8-15 = PortD.0-PortD.7
If so that greatly simplifies something I am trying to impliment. The reason I want to change PORTH from C to D is that I need to use the USART which is on C6 and C7 so that would only give me 14 useable pins.
DOH !!!!
Thatll teach me not to make sure I have a newly refreshed view of a thread before I post a reply !!!!
Last edited by keithdoxey; - 27th March 2007 at 20:37.
Reason: Explaining why I look like a Dumba$$
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks