Go Down

Topic: PWM Frequency Library - Still will not compile for ATmega1284  (Read 747 times) previous topic - next topic

JacksonAudio

After giving up on this about a year and a half ago I came back to it tonight and I still can't get the PWM.h library to compile for this chip.

Every other chip option I have will compile just fine but not this one.

Can anyone help? I'd hate to have to upgrade to the MEGA just so I can get this code to compile. I'd be happy to PayPal $100 to the first person who can give a solution.

Thanks!

Here are the errors that are being thrown out when it tries to compile

Code: [Select]
error: 'SetPinFrequency' was not declared in this scope
error: 'pwmWriteHR' was not declared in this scope

JacksonAudio

I should also mention that I using the MightyCore board definitions.

email me at brad@jacksonaudio.net if you're interested in helping.

6v6gt

Which arduino pwm library are you using ?
Github is littered with all varieties of these.
Since these will directly manipulate hardware registers, these will be dependent on the specific MCU.

JacksonAudio

Thanks for writing back! 6V6! (you must love amps like I do :)

This is the library: https://code.google.com/archive/p/arduino-pwm-frequency-library/downloads


JacksonAudio

I would also be happy if this worked with the MiniCore 328 board.

6v6gt

Well, this was the first one I ever built:



The output valve is a 6V6GT although the only vacuum tube stuff I've done recently is a Nixie clock.

I guess I could fix the library so it accepts the 1284 and compiles, but can't test it on a physical board. Are you prepared to do the testing to check out the functionality ?
Is the 1284 the only board you've tried the example code on with the "MightyCore" ?

I've already had to make a fix it so it compiles with a recent IDE with the standard core. It looks like that could be a similar problem as that with the "miniCore". That I'll test myself.



JacksonAudio

I just got the MiniCore 328 to work at 20MHz! So that's HUGE progress!

At least now I can run that at 20MHz!

6v6gt

OK. I got it to compile with the minicore using a 328 board.

You should be able to unpack the zip and compile the example .ino it within the folder because the modified library parts are in the sketch folder and it will take those in preference to those parts in the standard library location.

The original library is not compatible with modern IDEs



[this crossed with your post. Let me know how you want to carry on]






JacksonAudio

I got it to work just fine with the MiniCore 328.

Think we can get the 1284 working?

6v6gt

I'll make the changes now and send it for your testing.
If you try the code I sent you with a 1284 you should now get a decent error message.

6v6gt

I restructured it to compile with all 3 cores I tried it with (standard, mini and mighty) and the 1284 and 1284P just with the mighty core.
The functionality testing I have to leave to you.
Let me know how you get on.

JacksonAudio

I restructured it to compile with all 3 cores I tried it with (standard, mini and mighty) and the 1284 and 1284P just with the mighty core.
The functionality testing I have to leave to you.
Let me know how you get on.

You are BRILLIANT!!! What did you change?

JacksonAudio

I've been messing with it and it just plain works. :)

Very nice work!

6v6gt

I'm pleased that all worked OK. I'll make a list of the changes and send them tomorrow because it is now late here.

Go Up