Electronics > Projects, Designs, and Technical Stuff

Another Microchip Screwup? Tx2/Rx2 on the PIC1F26K22....

(1/1)

Jon Chandler:
(Excuse a couple paragraphs of necessary background information)

On my TAP-28 board, designed for embedded applications using 28 pin PIc18-series parts, I've included connectors for various functions.  There's a 6-pin connector for ICSP, following the pinout convention of the PICkit 2.  There's a 6-pin connector for the UART with TxD and RxD (along with 2 other port pins for general purpose use) that follow the pinout convention for the PICkit 2 UART tool.  The makes it simple to program the chip with the PICkit, and then swap the cable over to the UART connector to monitor program execution.

There's a 3rd 6-pin connector for I2C/SPI.  For this, I followed the convention of the PICkit serial analyzer.  The result is connectors that match the function, but they are all wired similarly with (up to) 4 port pins, power and ground.  If a particular feature isn't being used, the connectors are somewhat interchangeable with power, ground and 4 general-purpose port pins.

Many of the 18F-series map the functions the same way, so many different parts can be used on the board.

Now enter the 18F26K22, a 28-pin package with 2 UARTs.  Very handy for I/O intensive applications.  So the question came up of how this would map to the dedicated connectors.

The first complaint is the idiotic pin diagram from the data sheet.  It shows only the port numbers and none of the alternate functions.



Looking further, I found the pin table.  Tx2 and Rx2 are on RB6 and RB7, the pins used for ICSP.



Ok, that's good.  The 2nd UART maps to the ICSP connector.  But looking a little closer, and looking at how my connectors map, this reverses Rx and Tx compared to my UART connector.  Bad luck you may be thinking.  But what this means is the when you have the PICkit connected to the ICSP connector for programming, when you launch the UART tool to monitor the second UART (convenient, since the PICkit is already connected there), the UART connections will be WRONG.

Maybe this is way the UART tool isn't included in the PICkit 3 :)

Mechatrommer:
maybe they are walking backward!

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version