Lock PIC

Hi, I programed a pic16f88 using the com84 pic prog hardware and winpic programmer wich is just a few resistors conecting the pic to the rs232 port, to ensure 13vpp I tied the rs232 gnd to vss+2v with vss otherwise floating with VDD from its own isolated 5v regulated supply, this gives proper voltages as far as I can tell in and out.

It worked fine untill I both removed the LVP capability and set all port b to outputs and logic high.

It seems as though this makes it impossible to program, as all the program commands seem to rely on being able to set RB6(program clock) and RB7 (program data) both low while taking PGM to 13v, when either are high PGM=13v has no effect.

Is it safe or wise or likly to work if RB6/7 are forced low when they are outputing high ?

I did howver manage to solve it by cycling the vdd while holding vpp=13v and toggling the rb6/7 manualy in winpic, fortunatly the rs232 current is enough to hold it low before the program pulls them high, however it doesnt work unless I do it manualy.

Colin =^.^=

Reply to
colin
Loading thread data ...

Yo,

What you want to do is hold MCLR at ground (reset) which floats rb6,7. Now pull down rb6,7. Then drive MCLR directly to VPP to enable programming.

What is really bad is programming SLEEP near the start of your program. This requires you to hold VCC low until just after you raise VPP to keep the sleep instruction from executing before you get it into program mode.

Luhan

Reply to
Luhan

port,

floating

b

program

are

and

Thanks, however I forgot to mention I disabled MCLR in the configuration, I needed all the pins !

It does seem that raising VPP before VDD always works though, wich means manualy instigating a total erase by toggling in 4 1's.

I could of course swap the pins so rb6/7 are inputs, however I think I need a bigger chip anyway, I was going to try and do extra PWM channels in software but thinking better of it now, it takes quite a bit longer to implement than I initialy thought, internal clock is slower, and its 4 clocks per instruction not 1 wich I mistook single cycle instruction to mean.

A chip designed for brushless motor control with 4 complimentry PWM with programmable dead times is going to be relativly easy, although I initialy thought it would be overkill.

Colin =^.^=

Reply to
colin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.