View previous topic :: View next topic |
Author |
Message |
dave10
Joined: 09 Apr 2013 Posts: 14 Location: UK
|
outputs switching on during programming device |
Posted: Tue Nov 26, 2013 9:17 am |
|
|
Hi
I have an electric motor and heater being switched on via two opto traics devices which are connected to the microcontroller
Both the heater and motor are working as you would expect. But when the device is being programmed the output for these two particular item switches on briefly enabling the pump and heater.
The output is switching on upon the microcontroller for some reason
Is there a reason for this. The microcontroller I am using is a PIC18F87K22.
What is the default for a connection pin when it is being programmed ?
Thank you in advance for any help
dave
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Tue Nov 26, 2013 9:33 am |
|
|
Are the pins physically biased to the 'OFF' state by external resistor?. They need to be. Normally the pins are inputs when the chip is being programmed using ICSP. This is the same as during power up, but whilst during power up, they are in this state for a few mSec, and capacitance would normally keep them from charging to an 'on' voltage, during programming they are like this for several seconds...
What pins are involved?.
Best Wishes |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Tue Nov 26, 2013 10:10 am |
|
|
Ttelmah wrote: | ...Normally the pins are inputs when the chip is being programmed using ICSP.
Best Wishes |
This is not the behaviour I have observed. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
dave10
Joined: 09 Apr 2013 Posts: 14 Location: UK
|
Re: outputs switching on during programming device |
Posted: Tue Nov 26, 2013 10:49 am |
|
|
Hi Guys
Thank-you for the quick reply.
motor is controlled by pin J7
heater is controlled by pin J6
which connects to a M0C304IXSM device which is connected to a BTA20-600 controlling the A.C side.
Thanks Dave
dave10 wrote: | Hi
I have an electric motor and heater being switched on via two opto traics devices which are connected to the microcontroller
Both the heater and motor are working as you would expect. But when the device is being programmed the output for these two particular item switches on briefly enabling the pump and heater.
The output is switching on upon the microcontroller for some reason
Is there a reason for this. The microcontroller I am using is a PIC18F87K22.
What is the default for a connection pin when it is being programmed ?
Thank you in advance for any help
dave
|
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Tue Nov 26, 2013 1:10 pm |
|
|
On chips which have multiple ICD pin pairs, these _all_ seem to drive sometimes when programming, The 'aux' pin on older PIC's also drives.
I'm afraid you need to redesign, so the circuits are physically disabled.
Best Wishes |
|
|
dave10
Joined: 09 Apr 2013 Posts: 14 Location: UK
|
heating switching on while programming |
Posted: Wed Nov 27, 2013 3:27 am |
|
|
Hi Ttelmah
Thanks for reply. I'll have to think about that one ?
Might be easier just to move control to another pin/port ?
Or logic gate which detects when device is being programmed ?
Thank you for your help. Dave |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Wed Nov 27, 2013 4:00 am |
|
|
Seriously, most people do not run the 'power' electronics, when programming a board. Just have a jumper to disconnect the processor from the main power rail. Have the ICD connection provide power to the processor. Then you can leave the system power off, remove the jumper, program the chip with the ICD powering this, and there is no danger at all.
Must safer.
Best Wishes |
|
|
|