piyushpandey
Member level 4
Hi guys
I am using the pic16f1508 microcontroller in which due to shortage of the pins on the pic microcontroller and abundance of peripherals I have used the programming pins also for the general purpose .
So want to check that whether it is not going to create any problem with the ICSP programming.
Actually I have connected the switch pin to the MCLR pin as follows:
here I am using the mclr pin internal pull up option as I am also using the MCLR pin as the digital input. But I have connected the switch to a 10k pull up resistor and I have read somewhere that when you use the internal pull up resistor for the MCLR and also use the external resistor than your voltage gets divided as the circuit will work as the voltage divider but in this case there are two resistors one is 1k and other is 10k.
Also in another case I have connected the analog input of the potential driver to the ICSPDAT pin of the controller i.e. it is working as the ADC during normal operation and during programming must be in the digital mode.
third is that I am using the ICSPCLK pin to drive a transistor which in return control the 7 Segment display.
The screenshot is here:
I am not able to get the idea that how should I design the ICSP so that I can use it both for the programming and IO.
Please help me guys ...............
Thanks
I am using the pic16f1508 microcontroller in which due to shortage of the pins on the pic microcontroller and abundance of peripherals I have used the programming pins also for the general purpose .
So want to check that whether it is not going to create any problem with the ICSP programming.
Actually I have connected the switch pin to the MCLR pin as follows:
here I am using the mclr pin internal pull up option as I am also using the MCLR pin as the digital input. But I have connected the switch to a 10k pull up resistor and I have read somewhere that when you use the internal pull up resistor for the MCLR and also use the external resistor than your voltage gets divided as the circuit will work as the voltage divider but in this case there are two resistors one is 1k and other is 10k.
Also in another case I have connected the analog input of the potential driver to the ICSPDAT pin of the controller i.e. it is working as the ADC during normal operation and during programming must be in the digital mode.
third is that I am using the ICSPCLK pin to drive a transistor which in return control the 7 Segment display.
The screenshot is here:
I am not able to get the idea that how should I design the ICSP so that I can use it both for the programming and IO.
Please help me guys ...............
Thanks