Hello Cheznez,
Chez>>i am programming a pic16f648 for the first time. in the manuel i found a statement that says the pin number has nothing to do with the physical pin number. How do I assign know which physical pin number will be used for each pin of a port<<
Most chips that I know of, have a little indent, or dot on the #1 pin of the chip, and you count clockwise or counter clockwise for the pin numer.
You have to look at the DATA sheet for the PIC chip you are using.
For example the chip has 8 pins.....
PortA has 8 pins, but for a ADC pin there may be 5 of them. Pins number 0,1,2,3,7. but on your Switch part of the program (the headers that tell the chip which pins you are using for ADC), It keeps them in order.
so activating a ADC would be like
ADCON1="00011111" 'Activating all 5 ADC's on pin 0,1,2,3,7
not
ADCON1="10001111"
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks