Menu

Question about behaviour reading and writing Attiny (HV serial programming)

Anonymous
2020-11-26
2021-02-23
1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2020-11-26

    HI

    I have built the Open Programmer finally and will build the addon boards shortly. Everything tests ok in terms of voltages. Reading and writing PICs on the main board works fine. I thought I would try an Attiny84 and Attiny2313 on a breadboard but I am noticing the following strange behaviour, or perhaps its normal? When I firs tplug the programmer into the usb port of my PC and run the gui I can only do 1 read or write before the chip is no longer recognised when trying subsequent read or writes? I need to unplug the usb and replug it in to do ever single read or write. I cannot read or write more than once without disconnecting the programmer and reconnecting. Is this normal ? I dont see this behaviour when using PICs onboard.

    Regards

    Richard

     
  • Alberto Maccioni

    No, of course it's not normal.
    Are you connecting to the expansion headers?
    Are you using VPPU and VDDU?

     
  • Anonymous

    Anonymous - 2020-11-27

    Hi

    Yes I am connecting to the expansion headers. I am using vddu and vppu and wiring the breadboard to mimick the expansion board incl the capacitor. Strange, I cannot help but feel its related to my PCs usb power. I will try another computer when I get a chance.

     
  • Anonymous

    Anonymous - 2020-11-29

    Unfortunately I see the exact same behavior on another PC. Perhaps it is my breadboarding, although why it recognizes the Attiny after a fresh usb connection is strange. I will solder up the official addon board and try it this week. Thanks again for this great project,

    Cheers

     
  • Anonymous

    Anonymous - 2020-11-30

    I built the official Atmel addon board and I observe the same behavior described in the original post with Attiny 85 & Attiny84. Interestingly I do not have any issues with multiple read/writes with an Atmega328 on the same addon board ? Any suggestions what it might be ? I see the following when doing a read of an Attiny85

    Programmer detected
    VID=0x1209 PID=0x5432
    
    Firmware version 0.11.2
    Hardware ID: 0.0.1 (18F2550)
    
    USB voltage too low (VUSB<4.5V)
    Regulator up and running after 0ms VPP=11.8V
    
    CHIP ID:FFFFFF
    Unknown device
    LOCK byte:    0xFF
    FUSE byte:    0xFF
    FUSE HIGH byte:   0xFF
    Extended FUSE byte: 0xFF
    Calibration byte: 0xFF
    
    Reading code ... completed
    Reading EEPROM ... completed
    
    Code memory:
    (empty)
    
    EEPROM memory:
    (empty)
    
    End (4.53 s)
    

    That shows a voltage warning on the usb. ? Any suggestions appreciated. I will check all the components on the mainboard tonight.

    Richard

     
  • Richard

    Richard - 2020-11-30

    I finally got around to registering.

    After checking all the connections and replacing capacitors I still have the same issue.

    What I have found by accident is that if I touch certain areas of the underside of the board the chip read is successful ? It sounds like a ground problem ? If I touch the collector of Q2 and the positive side of C8 it works perfectly ?

    Richard

     
  • Alberto Maccioni

    Strange phenomenon. Can you check what is the voltage on the ATtiny after the first programming cycle?

     
  • Richard

    Richard - 2020-12-02

    i only had a few minutes tonight to probe a few pins on the attiny84 with my oscilloscope. What i discovered is if I connect the scope probe ground to a ground pin and then probe the attiny84 VPP pin I can do multiple reads without issues, but if I remove the probe tip from the VPP pin I get the error outlined above. The voltage on VPP steps from 0v to 5v for a short period (340us) before stepping up again to 12v for the reminder of the read.

     

    Last edit: Richard 2020-12-03
  • Alberto Maccioni

    Maybe for some reason VPP is not going back to 0 after programming.
    What if you completely remove the target device?
    It will be reset for sure.
    VPP should be discharged by R24; if not it could mean that R24 is faulty.

     
  • Richard

    Richard - 2020-12-05

    VPP with and without target on the falling edge after a read

     
  • Richard

    Richard - 2020-12-05

    With target

     
  • Anonymous

    Anonymous - 2020-12-07

    I got the same problem programming a pic. The problem is about th A0 pin that reads an AC voltage value to control the PWM exit when I touch nerby this pin the VPPU voltage go up 16 and the A0 reads again this value and dont let you program anymore to avoid damage on the target device and also it stuck on this value. You can notice that before programming this value is less than 5V and after that it is like 12V that is acceptable
    So the solution is change this behavior on firmware

     
  • Anonymous

    Anonymous - 2020-12-07

    Well the problem was that VPPU is disabled so when you touch near the adc pwm charges the inductor and it stucks. The solution could be an upgrade on the pcb where you can set another transistor to ground this signal every time VPPU is disabled. If you want a kick fix you can enable manually VPPU and instantly the signal get back to normally and in my case this dont damaged my microcontrller cause the ground resistor discharge it. Hope this could be helpfull

     
  • Richard

    Richard - 2020-12-07

    OK, thanks. So the behaviour is set by the firmware and is normal without modification ?

     
  • Anonymous

    Anonymous - 2020-12-07

    How do you enable VPPU manually from the gui ?

     
  • Anonymous

    Anonymous - 2020-12-07

    You can set VPPU ON in I/O option in opengui, I will try to make a fix in the gui source code to fix this problem permanently and share you when its done

     
  • Anonymous

    Anonymous - 2020-12-07

    Another solution I tough is desactivate analog reads and PWM until the device is not writing

     
  • Alberto Maccioni

    I think you are all jumping to conclusions without sufficient evidence.
    The fact that touching A0 (DC feedback node of the DCDC regulator) you change the output voltage is quite normal, it depends from the output impedance of the perturbing terminal (the finger) with respect to the source impedance. I don't understand why you say VPP is "stuck"; to what voltage? For how long? Please provide a detailed description and some snapshots.
    What would be the firmware bug to correct and how?
    R24 will discharge VPPU pretty quickly when Q1 is off; and in general there are no timing constraints on high voltage pins, so an active off switch is not necessary.
    Regarding the problem with ATtiny84 I still have to try a programming cycle; last time I did it it was many years ago.

     

    Last edit: Alberto Maccioni 2020-12-07
  • Alberto Maccioni

    Also please try removing completely the ATtiny84 and inserting it again a few minutes later: does it enter program mode?

     
  • Richard

    Richard - 2020-12-07

    Inserting the ATtiny84 a few minutes later does not help.

    Richard

     
  • Sebas Alvarez

    Sebas Alvarez - 2020-12-08

    Here I share you the bug I found

     

    Last edit: Sebas Alvarez 2020-12-08
  • Alberto Maccioni

    Quick update on ATtiny problem: I found that my AVR adapter has an extra 10k resistor soldered from VPP to GND and works reliably every time. No idea why I added it, it was 2014 and I don't remember.
    Removing it I see the same problem; touching VPP also makes it work; a capacitor as small as 100pF also is fine (and easy to connect using pin 1 and 4 of U55).
    No success fiddling with IO tab, also not really recommended because of potential damage with high voltages.
    I will investigate more, but I would say the workaround is easy enough.

     
  • Alberto Maccioni

    Regarding High VPP problem: I cannot reproduce it, my finger does not cause any change in VPP, whether at 12V or 6V.
    Theoretically you could force the feedback node to gnd and then the regulator would try to compensate increasing the voltage, but in my case the maximum is ~15V (with an extremely low current capability: indeed a very poor boost converter).
    After releasing the node, VPP would never stay that high due to the feedback divider which pulls down with a time constant of a few seconds.
    The only thing I can suggest is to look for false contacts or shorts.
    Any chance of recording VPP, FB, or RC2 during the problem?

    By the way, since the two problems are completely unrelated, I suggest to start a different thread.

     

    Last edit: Alberto Maccioni 2020-12-09
  • Richard

    Richard - 2020-12-09

    Thanks Alberto. I will try a small capacitor between pin1 and 4 on U55 as you suggest.

    Richard

     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.