Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Setting High Speed PWM on ATTiny85

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
nanawhite107
Posts: 2
Joined: 2017-06-26 09:04

Setting High Speed PWM on ATTiny85

#1 Post by nanawhite107 »

I am having trouble setting up high speed pwm on my Attiny85. I need to use the PCK, at a speed of 400kHz. I believe that I have followed the data sheet correctly, but for some reason, the timer interrupt flags are not working.

If I program the device, the output of the corresponding pin is a constant 5V.

If I comment out the PCK setup and use the system clock instead, the flags are correctly set and PWM works fine. The code is posted. I apologize for the formatting and comments. Any thoughts as to why the flags aren't setting and the PWM isn't working?

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Setting High Speed PWM on ATTiny85

#2 Post by arochester »

What does this have to do with Debian?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Setting High Speed PWM on ATTiny85

#3 Post by GarryRicketson »

Edited,... I realized I posted a bad link , also looks like the other problem
has been taken care of.
So I edited and removed everything.
Thank you
Last edited by GarryRicketson on 2017-06-26 16:48, edited 1 time in total.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Setting High Speed PWM on ATTiny85

#4 Post by pylkko »

There is a forum called avrfreaks where professional and hobbyists discuss avr microcontroller programming using Linux and other OS. Ask there.

This place you can ask about setting up a environment on Debian and get better answers than elsewhere, but other technical questions about the actual code you ate not likely to get good responses for

I suspect that you need to set the clock to 8 mhz and perhaps set a fuse. Read the data sheet and the errata. I have some vague recollection that 400 mhz pwm is possible but that there was some catch/problem. Attinys are not like atmegas in many respects

Post Reply