Set voltage level in Microchip Studio

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi.  First time posting.  I have a Microchip Studio project that works reliably at 5V with an ATTiny 441.  However, a recent HW change requires operation at 3.3V and I have not been able to get this configuration to work. At any voltage under 4.5V I am unable to read fuses, read the device signature or program or debug the device.  

 

The MPLab IDE appears to have voltage level options but I can't find the equivalent in Microchip studio:

https://microchipdeveloper.com/pickit4:config-power

https://microchipdeveloper.com/ipe:power-options

 

Does this option exist and if so, where?

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The brown out detection fuses BODPD and BODACT are both disabled.  I had tried this approach earlier with no success (Set back up to 5v, enable BODACT and set BODLEVEL to 1.8)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

It is a regular AVR.  

So it will run ok at 3.3V with F_CPU <= 10MHz

Brown-Out @ 2.7V is appropriate for a 3.3V system.

 

What F_CPU and what form of VCC are you using ?

 

In practice most AVRs will run happily at higher clocks and lower voltage than guaranteed by the datasheet.

Note that power supplies are important.  e.g. USB, mains, battery, ...

 

David.

 

Curiosity boards can set different VCC levels by software.   Most "regular AVR" just rely on your electrical design.

Last Edited: Fri. Jun 17, 2022 - 04:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danikes wrote:
Does this option exist and if so, where?
Yes for Power Debugger; otherwise, Python for MPLAB PICkit 4 (IIRC)

 

VOUT Target Supply | Power Debugger

https://github.com/microchip-pic-avr-tools/pymcuprog/blob/main/pymcuprog/utils.py#L118

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you David and gcchapman.  I should have specified that I am using an external supply as I need more power than the debugger can supply (100mA?).  The supply is feeding the PICKit sense line and the micro.  Please correct me if I'm wrong but the Power Debugger and python options only apply when powering from the debugger, right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danikes wrote:
the Power Debugger and python options only apply when powering from the debugger, right?
Yes

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just following up to close this thread.  I had a very chatty sensor that shared SPI programming lines (CLK and MISO, but not DebugWire) with the ATTiny.  The sensor is hardwired at 5V and immediately starts spewing data on powerup.  When the ATTiny runs at 5V there was no issue but at 3.3V the comms from the sensor did interfere with programming the ATTiny.  Not sure why though.  Any thoughts?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danikes wrote:

Not sure why though.  Any thoughts?

 

Likely the 5V SPI signal is feeding through the input protection diodes and messing with the 3.3V rail.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The SPI sensor must be de-selected during the ISP programming of the AVR.

e.g. the sensor's /CS pin has an external pullup resistor.

 

(Most SPI devices are active-low.  If your sensor has an active-high CS pin you need an external pulldown resistor.)

 

This is only important for ISP.   When you are using debugWIRE AS7.0 programs and debugs with the dW pin.

But you still need the sensor to be de-selected before you can "disable debugWIRE and Close" because this requires the ISP pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danikes wrote:
Any thoughts?
Shared Use of SPI Programming Lines | AVR® Microcontroller Hardware Design Considerations (AVR042)

(5V - 3.3V) / (330 ohms + approx 30 ohms) = approx 5 mA (less than recommended maximum though greater than recommended injection current limit)

 

P.S.

AVRxt is the follow-on to AVRe.

tinyAVR® Devices | AVR® Instruction Set Manual

https://www.microchipdirect.com/product/search/all/ATtiny424

Absolute Maximum Ratings | tinyAVR® 2 Family (injection current limit is dependent on VDD)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The sensor is hardwired at 5V

 

Welcome to the Forum.

 

I assume you have level conversion between the 5V sensor and the 3V micro?

 

I assume you have series resistors on the sensor's lines, as mentioned in the Application Note gchapman linked to above?

 

You can always post a schematic here and gets lots of feedback / suggestions on the hardware design.

 

Good luck with your project!

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Further clarification. 

  • The sensor is the Luminox LOX-O2.
  • It uses a UART for comms, not SPI.
  • The sensor is powered by 5V but communicates at 3.3V. 
  • I did not have series resistors as per the App Note.  Good to know!  I'll pass this along to the HW guy that gave me this board.

 

Thanks for your responses.

Dan