Simple solution then...
Pin16 var PORTE.0
Pin17 var PORTE.1
Select Case SerinData
Case 16
PortPin=Pin16
Case 17
PORTpin=pin17
End select
High Portpin
Simple solution then...
Pin16 var PORTE.0
Pin17 var PORTE.1
Select Case SerinData
Case 16
PortPin=Pin16
Case 17
PORTpin=pin17
End select
High Portpin
Last edited by mister_e; - 2nd June 2005 at 04:34.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I tested the following code and it does not work.
PortPin Var Byte
Pin16 Var PortE.1
PortPin = Pin16
Serout2 PortPin , 16390, ["Hello World"]
See if ......
Serout2 PortA.0[33] , 16390, ["Hello World"]
.... will output data on PortE.1. If it does you should be able to access all pins on your pic.
I'll put money on the fact that you've not switched it into DIGITAL mode... PortE like PortA is muxed with the ADC...
I have declared at the start of the code ADCON = 7 to switch Pins to digital mode. Now since the 18F458 is 40 Pin PIC perhaps the 7 is the wrong number.
I've run the following code and have noted what works and what doesn't below.
ADCON = 7
PortPin Var Byte
Pin16 Var PortE.1
PortPin = Pin16
Serout2 PortPin , 16390, ["Hello World"] ' this does not work
Serout2 Pin16 , 16390, ["Hello World"] ' this works
Serout2 Pin16 , 16390, [Dec Pin16] ' this spits out 0
Serout2 Pin16 , 16390, [Dec PortPin] ' this spits out 0
Bookmarks