Andy_123 said:I got DG411s, so I will try this weekend.
Lothar Stolz said:Hi everybody!
I think the extra DC-DC-converter-IC could be easily abdicable. In industry, MCUs now often are taking over the switching-regulator part, too, and of course the 18f4550 present in the design contains everything needed, just coil, transistor and schottky to it! So I thought of patching the 18f4550 firmware with a simple (this are just a few lines) switcher algorithm (interrupt-driven, using ADC, one plain IO-pin (not necessarily PWM-pin)). Are there already any details known (unfortunately time is money :-/ ) about uC-resources allocated (you wrote about some interrupts, and TMR0) by the 18f4550-firmware? The software control would also give a flexible, software controlled Vpp like in real ICD2, no need for any digital poti!
In the schematics I saw a transistor design like the one of my first serial clone design is used, but you are using lower resistors and don't specify which type of the BC5x7-series-transistors (A to C: widely different gain!!) should be used. The initial idea of this MCLR-signal-generation with defined Rs was an inherit current limiting to prevent latch up of the target-PIC (this can occur when large currents flow (due to inner Cs) into MCLR when switching voltage levels). When driving the transistors with higher base currents(switch mode)/undefined gain then **there should be a small but few ohms resistor prior to the MCLR pin!!!!** to protect your target! It's just one cheap resistor!
Andy_123 said:Now about Lothar's idea to patch 4550 firmware - I would try to avoid this - Microchip may reload code once you are going from one MPLAB version to another and this will kill Vpp generator. They did it while going from 7.31 to 7.40
Lothar Stolz said:@slovak:
PIC18f2550 datasheet, page363 (Absolute Maximum Ratings), note 2 says: "Voltage spikes below VSS at the MCLR/VPP/RE3 pin, inducing currents greater than 80 mA, may cause
latch-up. Thus, a series resistor of 50-100Ω should be used when applying a “low” level to the MCLR/VPP/
RE3 pin, rather than pulling this pin directly to VSS."
No didn't do that, but I did read a disassemled version of the 877 OS. It first sends a 0x11, then the set value. It's shifted out over RB1 (slave select), RB6 (clock) & RB7 (data), MSB first. To adjust for a certain Vpp level it increases the setvalue from 0 until the correct Vpp level is reached. Vpp feedback is read from RA0 which should return 0.08V per step.Andy_123 said:Did anyone try to read data coming to the POT?
024D SET STATUS.RP1, 0 ; * C3 &H01C9
024E SET STATUS.RP0, 0
024F SET PORTB.BIT1, 0 ; slave select
0251 SET REG51, 0x11 ; send 0x11 (command?)
0252 CALL 0x0259
0254 SET REG51, REG53 ; send setvalue
0255 CALL 0x0259
0256 SET PORTB.BIT1, 1 ; unselect
0257 CALL TMR0_Delay_216 ; delay 1 msec
0258 RETURN
0259; * C2 &H0252
025A SET BITCNT, 0x8
025B RLF REG51, F ; * G1
025C IFEQ STATUS.CARRY, 0
025D GOTO 0x0260
025E SET PORTB.BIT7, 1
025F GOTO 0x0261
0260 SET PORTB.BIT7, 0 ; * G1
0261 NOP ; * G1
0262 NOP
0263 NOP
0264 NOP
0265 SET PORTB.BIT6, 1
0266 NOP
0267 NOP
0268 NOP
0269 NOP
026A SET PORTB.BIT6, 0
026B DECFSZ BITCNT, F
026C GOTO 0x025B
026D RETURN
Could you post your schematics?DG411 sucsessfully tested
New version of BOOT/FW may erase whole thing completely
so I would avoid modifying anything in 877.
I just dont see how whey set and adjust value in REG53
There is no reason why the whole 4550 could not be ALL reprogrammed whilst running.But in 4550, when it's updating itself, it is running some code (USB+reprogramming), so some kind of code area must be left untouched?
1182:ICD_Cmd_2A_SetChipType: ;
1183 SET VPPMIN, 0xa0 ; 0xa0 * 0.08V = 12.8V
1185 SET VPPOPT, 0xa2 ; 12.96V
1187 SET VPPMAX1, 0xa6 ; 13.28V
118A CALL 0x02F0
118D RETURN
...
02F0; * C1 &H118A
02F1 SET REG55, 0xff
02F2; * G1
02F3 SET REG53, REG55
02F4 CALL 0x024D
02F5 CALL PROG_MCLR_Vpp
02F6 CALL AD_Get_RA0
02F7 CALL PROG_MCLR_GND
02F9 SET REG56, 0x5
02FA; * G1
02FC IFLSS ADRESH, VPPOPT
02FD GOTO 0x0305
02FE DECFSZ REG56, F
02FF GOTO 0x02FA
0300 DECFSZ REG55, F
0301 GOTO 0x02F2
0303 SET REG53, 0
0304 CALL 0x024D
0305 RETURN
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?