PWM in ATTINY412

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

Hi all,

 

Unlike the ADC driver in ATTINY avr 1 series A confusing point that maybe i could not understood well. in the datasheet Page. 14 of Attiny212/412 the PWM/TCA driver is associated only with one pin PA3 (WO3), does this imply that only this pin can be used to generate PWM e.g. associated with DC Motor ?

 

Regards,

Moe

This topic has a solution.
Last Edited: Thu. Oct 18, 2018 - 12:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I not familiar with this MPU, but this table seems clear there is only one waveform output pin, see yellow highlight.

 

 

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
https://www.onegold.com/join/7134f67c2b814c5ca8144a458eccfd61

 

 

 

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

Hi Jim,

 

Thanks a lot, I think its quite new MCU, so datasheet is the only source like always. Interesting point here, is this pin PA3 is also used as EXTCLK (During debugging) but since am using only UPDI as a debugging I didnt need it. I hope that microchip release a more clarifications about how to use these pins during programming/debugging and when used as a GPIO.

 

Regards,

Moe

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

The general advise here is to use the largest MPU in the family for prototyping where you have lots of resources and full debugger support and fewer pin conflicts, once the project is complete then port it down to the smaller device.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
https://www.onegold.com/join/7134f67c2b814c5ca8144a458eccfd61

 

 

 

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

ki0bk wrote:

The general advise here is to use the largest MPU in the family for prototyping where you have lots of resources and full debugger support and fewer pin conflicts, once the project is complete then port it down to the smaller device.

 

Jim

 

 

Not entirely sure I agree with that, to be honest.  Then again, I'm not a General.

 

I like to develop on smaller chips where there is another larger one available, very much preferred in the same pinout, as it gives an expansion option for the inevitable feature creep.

 

Wouldn't be a problem, really, if we could stuff the feature creeps through Desktop Tower Defense, though.  S.

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

Well, its a matter about saving time also, working with exact part number also clarifies things which are not so easy to evaluate at the beginning....whats possible and whats not. etc. Also cost plays a big rule when it comes to serial production.

 

Regards,

Moe

 

 

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

Sorry to open this topic again, but there is something confusing in the datasheet of this ATTINY212/412, does this device has TCB0 counter/timer ? it seems from the tabel "5.1 Multiplexed signals" that the only timer it support is TCA0 / WO3 in split mode.

 

Jim has already mentioned that it seemes it only supports TCA0/WO3, then why is TCB0 & TCD0 mentioned in the datasheet? any clarification would be highly appreciated ?

 

Best regards,

Moe

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

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Thanks for the pic Theusch, Have you checked the table ? 5.1

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

Boy that datasheet is confusing! My reading is that it only has TCA0 but it seems there's some generic "family info" there that presumably applies to bigger/more pin devices and they've forgotten to trim it back to only those parts that apply to the 8 pin device. seems like some of the data actually only applies to the devices in the North-East of this diagram:

 

EDIT: then again, not much further on you hit this:

 

So I don't know what to make of that??

Last Edited: Wed. Oct 17, 2018 - 02:01 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

And I managed to confuse myself even further by looking at iotn212.h:

#define TCA0                  (*(TCA_t *) 0x0A00) /* 16-bit Timer/Counter Type A */
#define TCB0                  (*(TCB_t *) 0x0A40) /* 16-bit Timer Type B */
#define TCD0                  (*(TCD_t *) 0x0A80) /* Timer Counter D */

also

/* TCB (TCB0) - 16-bit Timer Type B */
#define TCB0_CTRLA  _SFR_MEM8(0x0A40)
#define TCB0_CTRLB  _SFR_MEM8(0x0A41)
#define TCB0_EVCTRL  _SFR_MEM8(0x0A44)
#define TCB0_INTCTRL  _SFR_MEM8(0x0A45)
#define TCB0_INTFLAGS  _SFR_MEM8(0x0A46)
#define TCB0_STATUS  _SFR_MEM8(0x0A47)
#define TCB0_DBGCTRL  _SFR_MEM8(0x0A48)
#define TCB0_TEMP  _SFR_MEM8(0x0A49)
#define TCB0_CNT  _SFR_MEM16(0x0A4A)
#define TCB0_CNTL  _SFR_MEM8(0x0A4A)
#define TCB0_CNTH  _SFR_MEM8(0x0A4B)
#define TCB0_CCMP  _SFR_MEM16(0x0A4C)
#define TCB0_CCMPL  _SFR_MEM8(0x0A4C)
#define TCB0_CCMPH  _SFR_MEM8(0x0A4D)

So that's actually setting blocks of registers at real physical SFR addresses which seems to strengthen the argument that it does have those peripherals.

 

Possibly even more definitive is the XML description in the ATDF file:

        <module id="I2117" name="TCA">
          <instance name="TCA0">
            <register-group address-space="data" name="TCA0" name-in-module="TCA" offset="0x0A00"/>
            <signals>
              <signal field="PORTMUX.CTRLC.TCA00" function="TCA0_ALT" group="WO" index="0" pad="PA7"/>
              <signal field="PORTMUX.CTRLC.TCA00" function="TCA0" group="WO" index="0" pad="PA3"/>
              <signal function="TCA0" group="WO" index="1" pad="PA1"/>
              <signal function="TCA0" group="WO" index="2" pad="PA2"/>
              <signal function="TCA0" group="WO" index="3" pad="PA3"/>
            </signals>
          </instance>
        </module>
        <module id="I2119" name="TCB">
          <instance name="TCB0">
            <register-group address-space="data" name="TCB0" name-in-module="TCB" offset="0x0A40"/>
            <signals>
              <signal function="TCB0" group="WO" pad="PA6"/>
            </signals>
          </instance>
        </module>
        <module id="I2129" name="TCD">
          <instance name="TCD0">
            <register-group address-space="data" name="TCD0" name-in-module="TCD" offset="0x0A80"/>
            <signals>
              <signal function="TCD0" group="WOA" pad="PA6"/>
              <signal function="TCD0" group="WOB" pad="PA7"/>
            </signals>
          </instance>
        </module>

EDIT that seems to suggest the outputs are muxable back to PA6/PA7 for B and D timers.

 

EDIT2: sorry, NOT muxable - the TCA0 signal W0 is muxable to EITHER PA3 or PA7 but for B and D it seems the output pin is fixed. But that does seem to suggest you could have A on PA3/PA7 and B on PA6

Last Edited: Wed. Oct 17, 2018 - 02:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
So I don't know what to make of that??

C'mon...obviously this is a perfect model series, as there has been no need to revise the datasheet at all since the first introduction about two years ago. 

21.3.3.2 Output
If ASYNC in TCB.CTRLB is written to '0' ('1'), the output pin is driven synchronously (asynchronously) to
the TCB clock.
 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Ah but you have to deliver some to the customer. Let them find the faults in the datasheet. They report those. Atmelchip wait the obligatory 3 years. THEN publish the datasheet with errata! cheeky

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

OP as you can tell there is not much experience with these new "0" and "1" AVR's yet.

If you discover something, please come back and post your findings, good, or bad.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
https://www.onegold.com/join/7134f67c2b814c5ca8144a458eccfd61

 

 

 

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

Thank you so much clawson!, I myself a customer, theusch if you are working for atmel, I beg you to ask them to correct it ?. I cannot consume all my time following threads on avrfreaks and opening support case on their website. this is completly insane.

 

you leave it to customers to figure it out by themselves, datasheet is completly confusing and not clear, full of errata? and you call it a perfect series ?

 

Best regards,

Moe

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

Moe123 wrote:
does this device has TCB0 counter/timer ?
clawson wrote:
THEN publish the datasheet with errata!

If there is errata for TCB then it must exist, right?

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

 

 

This is from Tiny817, if I made a comparison for the same series, then I dunno whose the engineer who wrote this datasheet.

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

Theusch, I repeat the problem goes like this:

 

if you look at the table it says something, if you look in datasheet it says something else ?

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

clawson wrote:

And I managed to confuse myself even further by looking at iotn212.h:

#define TCA0                  (*(TCA_t *) 0x0A00) /* 16-bit Timer/Counter Type A */
#define TCB0                  (*(TCB_t *) 0x0A40) /* 16-bit Timer Type B */
#define TCD0                  (*(TCD_t *) 0x0A80) /* Timer Counter D */

also

/* TCB (TCB0) - 16-bit Timer Type B */
#define TCB0_CTRLA  _SFR_MEM8(0x0A40)
#define TCB0_CTRLB  _SFR_MEM8(0x0A41)
#define TCB0_EVCTRL  _SFR_MEM8(0x0A44)
#define TCB0_INTCTRL  _SFR_MEM8(0x0A45)
#define TCB0_INTFLAGS  _SFR_MEM8(0x0A46)
#define TCB0_STATUS  _SFR_MEM8(0x0A47)
#define TCB0_DBGCTRL  _SFR_MEM8(0x0A48)
#define TCB0_TEMP  _SFR_MEM8(0x0A49)
#define TCB0_CNT  _SFR_MEM16(0x0A4A)
#define TCB0_CNTL  _SFR_MEM8(0x0A4A)
#define TCB0_CNTH  _SFR_MEM8(0x0A4B)
#define TCB0_CCMP  _SFR_MEM16(0x0A4C)
#define TCB0_CCMPL  _SFR_MEM8(0x0A4C)
#define TCB0_CCMPH  _SFR_MEM8(0x0A4D)

So that's actually setting blocks of registers at real physical SFR addresses which seems to strengthen the argument that it does have those peripherals.

 

Possibly even more definitive is the XML description in the ATDF file:

        <module id="I2117" name="TCA">
          <instance name="TCA0">
            <register-group address-space="data" name="TCA0" name-in-module="TCA" offset="0x0A00"/>
            <signals>
              <signal field="PORTMUX.CTRLC.TCA00" function="TCA0_ALT" group="WO" index="0" pad="PA7"/>
              <signal field="PORTMUX.CTRLC.TCA00" function="TCA0" group="WO" index="0" pad="PA3"/>
              <signal function="TCA0" group="WO" index="1" pad="PA1"/>
              <signal function="TCA0" group="WO" index="2" pad="PA2"/>
              <signal function="TCA0" group="WO" index="3" pad="PA3"/>
            </signals>
          </instance>
        </module>
        <module id="I2119" name="TCB">
          <instance name="TCB0">
            <register-group address-space="data" name="TCB0" name-in-module="TCB" offset="0x0A40"/>
            <signals>
              <signal function="TCB0" group="WO" pad="PA6"/>
            </signals>
          </instance>
        </module>
        <module id="I2129" name="TCD">
          <instance name="TCD0">
            <register-group address-space="data" name="TCD0" name-in-module="TCD" offset="0x0A80"/>
            <signals>
              <signal function="TCD0" group="WOA" pad="PA6"/>
              <signal function="TCD0" group="WOB" pad="PA7"/>
            </signals>
          </instance>
        </module>

EDIT that seems to suggest the outputs are muxable back to PA6/PA7 for B and D timers.

 

EDIT2: sorry, NOT muxable - the TCA0 signal W0 is muxable to EITHER PA3 or PA7 but for B and D it seems the output pin is fixed. But that does seem to suggest you could have A on PA3/PA7 and B on PA6

 

 

Clawson, this is the third prototype PCB i design based on a complete misguided datasheet! THANKS ATMEL!!!!

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

Moe123 wrote:
THANKS ATMEL!!!!

So, how many times is the fairly-long-time-defunct "Atmel" mentioned in the datasheet?  Rail at the new overlords...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Does anybody from Atmel/Microchip employees is around here in this forum ?. you know I used some Nordic chips eg. nrf52...etc, they have a complete staff for forum support.

 

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

Well Atmel are a bit famous for this (datasheets with copy/paste errors) but all the signs are that there is TCA/TCB/TCD in the device. Usually you can trust the ADTF more than anything else as this actually comes out of Microchip/(Atmels) silicon design process. So if the XML says there is a TCB that outputs on PA6 and a TCD that outputs on PA6(A)/PA7(B) then I would be inclined to believe that more than anything. But if this is a commercial design I wouldn't rely on the speculation of a couple of old grey-beards on some website with "Freaks" in the name! I would either contact my Microchip Field Applications Engineer and ask him or at the very least I'd open a support ticket with Microchip via their website which will get to some engineer inside Fort Fumble where they actually make the chips.

 

(On the evidence of this thread it does seem these new "Xtiny" chips have inherited the worst facets of the entire Xmega range - datasheets that are confusing beyond belief - sure old style tiny/mega had the odd error but usually there was enough to go on to get something working!)

 

Personally (God willing) I think I'll give it a decade or so for the dust to settle before getting too interested in these new toys!

 

PS look out for Morten as one of the few Micromel employees to raise his head above the parapet here but note that his focus is the support tools (specifically AS7 and now MPLABX) not the silicon itself - though the tools do things like building and simulating the code so they kind of need to know what's actually in the silicon!

Last Edited: Wed. Oct 17, 2018 - 03:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the OP seems to think this is MicroMel support site, it is not, we are just a bunch of fans sharing their experience with their favorite chips.

Log a support ticket at MC or contact your FAE for support!

 

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
https://www.onegold.com/join/7134f67c2b814c5ca8144a458eccfd61

 

 

 

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

Whoa, this is confusing indeed. From the datasheet, it seems the tiny212 has all the listed timers, but only timer A is connected to a pin. But ATDF says otherwise.

I would test it, but I don't have of these chips...

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

Hi all.

 

I can confirm that TCB0 is fixed to PA6, Using oscilloscope on the the output of PA6. this what clawson also concluded yesterday (Thanks!). Unfortunately, there is no way to use TCB0 on ATTINY212 & ATTINY412 other than for PA6.

 

I already opened a support ticket on MC to clarify it in their next revision.

 

Hope it helps the others,

 

Moe

 

EDIT: Maybe they are other ways to use it for other pins, but according to my limited knowledge so far its not. Thanks for all who contributed to this thread.

Last Edited: Thu. Oct 18, 2018 - 12:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To be honest this is kind of what happens when you cramp yourself into 8 pin chips!

 

I'll bet in the higher pin count devices the MUXing is more extensive and you get to swap things around?

 

EDIT thought so - this is 1617:

 

while this is the same thing for 212:

 

Last Edited: Thu. Oct 18, 2018 - 12:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

To be honest this is kind of what happens when you cramp yourself into 8 pin chips!

 

I'll bet in the higher pin count devices the MUXing is more extensive and you get to swap things around?

 

EDIT thought so - this is 1617:

 

while this is the same thing for 212:

 

 

Totally right, but sometimes its more about the cost...otherwise i would never go for this kind of commercialized mcu mess.

 

Regards and have a nice weekend everyone!

Moe

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

Dear All,

 

Very important update, I just got a reply from MC:

****************************************************************************************

The timers TCA, TCB and TCD are supported in this device. The datasheet is incorrect and needs to be updated. I have attached the correct pin descriptions, please find the attached I/Omux.png.

****************************************************************************************

 

 

Looks like it wasnt just about the timers, also USART, SPI, CCL the analog comparator...all messed up in this datasheet. although this table still doesnt make sense, I have to post it as it is.

 

@Admin: If you please add the table to the Errata or pin it somewhere so it can be easily accessed for other users.

 

Thanks a lot,

BR,

Moe

 

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

No, I have not been following this thread. As a general rule it is wise to write down your pin budget at the start of any project.
This will determine which chips are suitable.
.
I would then develop on the biggest family member. Then final build for the smallest cheapest target. And don't say that you can't afford an XMINI-817 for development even if your final target is 8-pin.
.
Families tend to contain all the peripherals but the multiplexer is limited for the pin-starved members.
.
Yes, it looks as if you have only got one PWM pin which seems unusual. Even a Tiny25 can produce multiple PWM.
Hey-ho. If your project only needs one PWM you will just have to use the specific pin.
.
David.

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

david.prentice wrote:

No, I have not been following this thread. As a general rule it is wise to write down your pin budget at the start of any project.
This will determine which chips are suitable.
.
I would then develop on the biggest family member. Then final build for the smallest cheapest target. And don't say that you can't afford an XMINI-817 for development even if your final target is 8-pin.
.
Families tend to contain all the peripherals but the multiplexer is limited for the pin-starved members.
.
Yes, it looks as if you have only got one PWM pin which seems unusual. Even a Tiny25 can produce multiple PWM.
Hey-ho. If your project only needs one PWM you will just have to use the specific pin.
.
David.

 

 

It looks like you havent even bother to know what the thread is about ?!. this is completly bad behaviour what you are posting. read the post, understand what we had written and then you are welcome to comment. Otherwise, keep your bad behaviour away.

 

BR.

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

My apologies. Are you saying that PORTMUX has undocumented CTRLC and CTRLD registers?
.
I still maintain that pin budget should be at the first stage of any design. It is easier to test a documented feature and report any errors.
It is interesting to speculate about undocumented registers. And perhaps Microchip will correct the datasheet.
.
David.

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

david.prentice wrote:
Are you saying that PORTMUX has undocumented CTRLC and CTRLD registers?
That certainly seems to be the implication. If all they gave him was the mux table then it was only half an answer as they failed to explain how to set up the MUXing. Presumably one can assume it is the same as:

 

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

I wrote #29 from a Tablet.

 

At a PC,   I have downloaded Tiny412, Tiny414 datasheets.   I had already got Tiny817 datasheet (and XMINI)

 

The 414 has got CTRLC.  The 817 has got CTRLC and CTRLD.     The 412 documentation might be intentional.

 

The Tiny817 peripherals are quite nice.   Tiny1617 and Tiny3217 have been added to the family.

 

For any cost sensitive project it is worth setting out your requirements and then looking at EVERY make of controller.    There is not much point in specifying a controller with EVSYS or DAC if you never use them.

Let's face it.   Any 8-pin 4kB project is not going to be very complex.    I bet that there are several suitable make and model of chip.

 

David.

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

Nice, they even gave you the uncensored version and forgot to sanitize the BREAK line on PA1.

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

david.prentice wrote:

I wrote #29 from a Tablet.

 

At a PC,   I have downloaded Tiny412, Tiny414 datasheets.   I had already got Tiny817 datasheet (and XMINI)

 

The 414 has got CTRLC.  The 817 has got CTRLC and CTRLD.     The 412 documentation might be intentional.

 

The Tiny817 peripherals are quite nice.   Tiny1617 and Tiny3217 have been added to the family.

 

For any cost sensitive project it is worth setting out your requirements and then looking at EVERY make of controller.    There is not much point in specifying a controller with EVSYS or DAC if you never use them.

Let's face it.   Any 8-pin 4kB project is not going to be very complex.    I bet that there are several suitable make and model of chip.

 

David.

 

Please follow,read, understand the thread, maybe the Topic name is somehow misleading "PWM in ATTINY412". Right now the discussion is about the timers/counters "TCA0, TCB0, TCD0" , datasheet mistakes and missing registers, discussion is not about comparison between different MCUs and cost.

 

You can open a new topic about comparison between Tiny 1 series MCUs if you like.

 

Thanks for understanding.

 

BR

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

clawson wrote:

david.prentice wrote:
Are you saying that PORTMUX has undocumented CTRLC and CTRLD registers?
That certainly seems to be the implication. If all they gave him was the mux table then it was only half an answer as they failed to explain how to set up the MUXing. Presumably one can assume it is the same as:

 

 

this is true also:

 

Reply from MC today:

*****************************************

And the default TCA0-W0 is PA3, but can be moved to PA7. However there should have a register to do this Mux (pin W0), I guess it might be PORTMUX.CTRLC and it is missing from the datasheet. I'm checking this with our internal team, I will update you as soon as I hear back.

*****************************************

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

The tiny402 datasheet  seems to have the correct pin table (the difference is, this part has some peripherals missing compared to the tiny-1 series counterpart):

 

But then, on the mux section, the CTRLC register is missing, so a reader would learn that timer A output 0 can be multiplexed, but not how to do it...

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

El Tangas wrote:

The tiny402 datasheet  seems to have the correct pin table (the difference is, this part has some peripherals missing compared to the tiny-1 series counterpart):

 

But then, on the mux section, the CTRLC register is missing, so a reader would learn that timer A output 0 can be multiplexed, but not how to do it...

 

Funny!. I think 402 and 412 are just the same.

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

Maybe they are. Someone should get a 402 and see if the supposedly missing peripherals are really there or not...

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

Viewing the datasheet the PIN number 5 of ATTINY402 has PA1 written and in the above decribe picture PA1 is connected to pin number 4 so what is actually true? 

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

Please dont mix, the first picture at the very beginning is for attiny212/412, last picture is for attiny202/402

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

The last picture where tiny402 is mentioned has a correction as in the datasheet  PIN number 5 of ATTINY402 has PA1 written and in the datasheet the above describes picture PA1 is connected to pin number 4 so what is actually true?

Last Edited: Tue. Dec 18, 2018 - 11:49 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When you want to control PA1, you write to bit 1, PA3 you write to bit 3...PA0 to 0, the number on the far left of the table is irrelevant. you can test it to make sure.

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

Please refer to the two images below.

Attachment(s): 

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

could you please give me the link of the datasheets u are using

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

You are mixing up things. this thread is about attiny212/412. the last picture which was posted from EL Tangas is about attiny202 and it came in the discussion as a comparison. stick to the datasheet of attiny202/402.

 

if you are using a custom board which i expect then I dont see whats the problem ?!

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

Sorry for the trouble it was just that i was using Attiny402 and saw this problem so replied to this forum.

Please do refer the link :

http://ww1.microchip.com/downloa...

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

You can continue writiny your questions in the thread that you opened, in order not to mix-up things