-
Notifications
You must be signed in to change notification settings - Fork 199
Atmega128 Teacup #312
Comments
DIOx_TCCR just a pointer to the timer configuration register so we can determine the appropriate timer to configure when you set the associated pin as a PWM (heater) output. |
As I can deduce these are values we use for PWM pins. Can someone confirm them, please? OC0 DIO12 - - Tried to build using configtool, but got this error: Edit: |
Hi everyone, Also, as I can see, TIMSK1 register is used in timer-avr.c, and in heater-avr.c other TIMSK0, TIMSK2 are used, but atmega128 has only TIMSK, which I already use in timer-avr.c, and ETIMSK, which I don't know is useful or not. Is there any walkaround or direct solutions? |
I'm struggling with a similar issue. I partly figured it out. The timers are preset to run at the desired PWM (fast) speed. Down below in the part
it will set the appropriate timer registers to take care of the PWM. |
Doesn't looks like the 128 has a lot of pwm-able pins. I would define all
without pwm, take a look into e.g. arduino1280 file, and use the software
pwm.
In the first 2 lines are two macros. Copy it in your file and name your
pins like the non pwm pins in the 1280.
If you need some help you could post your arduino file.
|
Hello everybody!
I've designed a new board using Atmega128 (no real reasons, just had several of them). I took sanguinololu as an example: everything is almost the same, except pin numbers and heatbed and extruder heater are connected to digital IO, not PWM. Now I am trying to configure and build Teacup using configtool.
What I've done so far is I created arduino_128.h file, where I use MegaCore pin numbers, and created board.myprinter.h file, which is a copy-paste with little necessery changes from sanguinololu board.
Now, the problem is that in arduino_128.h file I can't understand what and how do I assign DIOn_PWM and DIOn_TCCR values for pins. I have a little idea for DIOn_PWM values assignment, from datasheet I got:
#define OC0 DIO12 #define OC1A DIO13 #define OC1B DIO14 #define OC1C DIO15 #define OC2 DIO15 #define OC3A DIO3 #define OC3B DIO4 #define OC3C DIO5
and these values are used in it, but I have no clue what to do with DIOn_TCCR.
Could you please help to understand this of to find some useful source about it.
Thanks in advance.
The text was updated successfully, but these errors were encountered: