Page 1 of 1

Microchip PIC16F1939T-I/PT

Posted: Sat Apr 06, 2019 11:23 am
by Frank607
I’m making use of this Microchip; PIC16F1939T-I/PT

I have made a simple Flowchart to test If the ICSP is working. The Flowchart is working fine but when I upload the .hex file with PicKit2 I get this error: (see below)

I also don’t know if the configuration bits I have set are the good settings for this chip. I’m making use of the Internal Oscillator. Could someone please check this bits?

Thanks for your answers.

Frank
PIC16F1939T-I-PT - 0.1.fcfx
(8.22 KiB) Downloaded 240 times
2019-04-06_12-14-05.jpg
2019-04-06_12-14-05.jpg (139.55 KiB) Viewed 3149 times

Re: Microchip PIC16F1939T-I/PT

Posted: Sat Apr 06, 2019 1:39 pm
by Frank607
Suddenly the above error from PicKit2 goes away :-)

I have a nest question and I hope that someone can help me with this.

I’m trying to read 8 switches on PORT A and then send some output to LEDs on PORT C.

I have made a flowchart what does this on RA0 (switch) and the output goes to RC0 (LED). I think that this can be done simpler for the whole PORT but I don’t know how. I have read this forum but there is no similar question that I have.

Attached is the flowchart what I have made for one switch and one LED.
PIC16F1939 - 0.2 - Read Port A.fcfx
(8.2 KiB) Downloaded 240 times
Thanks for your answers.

Frank

Re: Microchip PIC16F1939T-I/PT

Posted: Sun Apr 07, 2019 2:13 pm
by medelec35
You can read the whole port at once:
Read Whole Port.png
(13.22 KiB) Downloaded 1229 times
You can also select Use Masking and only tick the pins you want to use.
Once read the port what do you want the output to do, match the input exactly?
If so just used the same variable you used on the input for the output and again select whole port and use masking if required.