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