Help With PIC18F46K42 Datasheet

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
Ditch
Posts: 71
Joined: 23 Jan 2017 23:14

Help With PIC18F46K42 Datasheet

#1 Post by Ditch » 10 Feb 2022 16:48

Hi All,

I want to connect an SPI display to the PIC18F46K42 but I can't work out which pin is used for the SPI SDO with this Microchip.

I don't know if the datasheet is missing this info or if I just can't see it! Any help would be appreciated.

Datasheet here --> https://ww1.microchip.com/downloads/en/ ... 01919G.pdf

Ian

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Help With PIC18F46K42 Datasheet

#2 Post by janni » 10 Feb 2022 17:37

Any pin on ports B & C may be declared as SDO with Peripheral Pin Select (PPS) - there's simply no default location for it, unlike with SDI and SCK (when it's an input).

sgssn
Posts: 35
Joined: 13 Sep 2021 16:24

Re: Help With PIC18F46K42 Datasheet

#3 Post by sgssn » 11 Feb 2022 11:20

Yes, as @janni wrote, look at chapter 17
if f.e. SPI1 SDO, shall be on RB4:

RB4PPS = 0x1f;

gerhard

Ditch
Posts: 71
Joined: 23 Jan 2017 23:14

Re: Help With PIC18F46K42 Datasheet

#4 Post by Ditch » 20 Feb 2022 00:37

Ok, Thanks for your replies,

I think I may look for a different chip, the further I look into this the more I think my primitive brain will struggle to change the libraries from IC2 to IC2_remapable etc.

Many Thanks
Ian

sgssn
Posts: 35
Joined: 13 Sep 2021 16:24

Re: Help With PIC18F46K42 Datasheet

#5 Post by sgssn » 20 Feb 2022 09:28

I dont know your compiler. But you could use Microchip MPLAB X and C-Comiler XC8. Microchip offers a tool to generate the setup. The tool is called MCC. You have to enter the usage of the pins and MCC generates all sufficient code you need.

Gerhard

Post Reply

Return to “PIC PRO Compilers”