Re: Control a Radio PLL with a PIC

Originally Posted by
RayL113
I'm trying to assign 4 pins from PORTA as the CHSEL f/register as follows;
CHSEL = PORTA.1.2.3.4
Get this error;
C:\PBP\PLL-CPU.BAS ERROR Line 24: Bad variable modifier: .1.2.3.4
I've tried different variations on this (1-4) (1234) etc. but with the same results.
What is the correct syntax for doing this? I only want to use these 4 pins.
You need to use BitWise masks for that
chsel = (PORTA>>1) & $0F
you'll need to use that line each time you want to read from PORTA.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks