program pic18f87j11 with pickit2

Status
Not open for further replies.

robz

New Member
Got a question about programming the pic18f87j11 microcontroller with a pickit2 programmer.

looking for the pin layout of the pickit 2 header i'll found this page:

https://www.electro-tech-online.com/custompdfs/2008/03/51292P.pdf

so i need 5 pins: Vdd, MCLR, Vss, DAT and CLK.

Vdd, MCLR and Vss is no problem. But i can't find the DAT and CLK pin on the mircocontroller. I looked several times to the pin diagram of the microcontroller and the page above, but i can;t find the way this must be connected.

thanks for your help...
 
i'm using all the pins of port B for communication with a LCD. I lead the lines of port B through a octal bus buffer to convert the bus level from 3.3V to 5V and then connect them to a LCD. Can i connected the pickit 2 directly to these lines ? (RB6 & RB7).
 
Can you use the LCD in 4 bit mode and free up PortB 4-7.

Also, check whether that Pic has dedicated pins as well as the port B ones.

Mike.
 
i already use the LCD in 4 bit mode. Port B: RB0=RS RB1=RW RB2=E RB3=DB4 RB4=DB5 RB5=DB6 RB6=DB7 RB7=OE(output enable bus buffer)

i use port b for the LCD because this port is suitable for direct led drive levels. PORT C is also suitable for that, but i use these pins for SPI and USART.
 
Last edited:
If your buffer only reads PGC and PGD you should be able to connect the ICSP connector between then PIC and the buffer.

If the buffer is bidirectional you need to be sure that it does not write to PGC and PGD during programming.
 
oke thanks!

maybe it's handy to put a resistor in RB6 and RB7 lines to the buffer. such as 10k?

my microcontroller operates at +3.3V so i don't have to connect the Vdd line of the PICKIT2 programmer? (because this is 5V)
 
Last edited:
robz said:
oke thanks!

maybe it's handy to put a resistor in RB6 and RB7 lines to the buffer. such as 10k?

my microcontroller operates at +3.3V so i don't have to connect the Vdd line of the PICKIT2 programmer? (because this is 5V)

I have included 10k resistors in the RB6/7 lines and it worked fine. You will have to setup your PK2 as a programmer as debugging won't work.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…