AVR Studio 4.19 TIMSK Error

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

Why would this set bit 5?

   

    TCCR1B = (1<<WGM12) + (1<<CS10);

    OCR1A  = nnnn;
    TIMSK  = (1<<OCIE1A);

   

    Or just:

    (1<<6) really does (1<<5), as well as (1<<5) really does (1<<6)

    or

    0x20 really does 0x40, as well as 0x40 really does 0x20

    LUNACY!

 

In the TIMSK, i.e. setting bit 5 (OCIE1B) sets bit 6 (OCIE1A) and vice versa, with an ATtiny2313!

The photo is of setting OCIE1A

 

iotn2313.h states:

#define OCIE1A  6
#define OCIE1B  5

 

Please someone try this and let me know if I am doing something wrong.

Attachment(s): 

Last Edited: Tue. Aug 20, 2019 - 05:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What happens in AS7 for the same?

 

(AS7 being the 10 years younger and actively maintained development of AS4 in the year 2019)

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

Is this happening on real h/w or in the simulator on AS4?

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

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

Thanks for replying Cliff, but no. AS7 will not run or load on my WIN 7 SP2 with 8 Gb of memory & 3.4GHz quad core.

There is no selection for Tiny devices in AS6 or I would confirm.

Confirmed on AS6 that it steps correctly. I am still re-learning AS6 "It offends our sensibilities and we are not amused"

 

I know it is old but I don't need a bloated .net app for what I am doing as you have heard from me before. So I won't re-hash it here.

So if anyone can confirm the operation in AS4 I would appreciate it. Yes AS4 as one steps through, F11 it does it backwards.

Last Edited: Tue. Aug 20, 2019 - 04:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sparky85 wrote:
it does it backwards.
  H/W or Sim?  What are we talking about here?

Jim

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

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

As I have stated, Simulator in debug mode.

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

Sparky85 wrote:
Thanks for replying Cliff, but no. AS7 will not run or load on my WIN 7 SP2 with 8 Gb of memory & 3.4GHz quad core.

Odd, it runs great on mine.  What was/is the problem?

 

Sparky85 wrote:
I know it is old but I don't need a bloated .net app for what I am doing as you have heard from me before. So I won't re-hash it here.

No argument from me on the bloatware.  But hey, if it works properly, and big hard drives are cheap as they are, I bite the bloat-bullet and move on.  I do admit I miss 4.19 at times though.

 

Sparky85 wrote:
As I have stated, Simulator in debug mode.

Not directly, but yeah, I figured you were.

 

Might I suggest you try MPLAB now that it supports AVR's?  It's a somewhat lighter install......

 

as far as your original question, last time I ran the 4.19 simulator it did not have the issue you are writing about. 

Sparky85 wrote:

Why would this set bit 5?

   

    TCCR1B = (1<<WGM12) + (1<<CS10);

 

It looks like you are adding the two bits together.  Try this:

 TCCR1B = (1<<WGM12) | (1<<CS10);

instead

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Yes I know not to use "+". It is as the code as was written, and trying to run as presented by the author. I would prefer to use | or |= for the bits mentioned. But that is not the focus of this discussion at this time.

AS7 is as I have stated, A: Bloatware, 2: crashes upon running; C:\ took many re-installs to actually finish its install, 0x0D: offensive in its over complication and "views" to use.

But I enjoy your interaction(s).

 

It looks like TIFR is backwards to the ISR vector name as well...... All in Sim v2, tiny 2313 or 2313A

 

Looky Looky, version 1 or the original version of the simulator is loading properly. More BUGS on a rushed - abandoned AS4.19.

OCIE1A = OCIE1A  when stepping, TIFR Flags work correctly.

 

Mega48 works properly in v2 sim BTW.

 

 

Last Edited: Tue. Aug 20, 2019 - 06:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just debug in disassemble mode, than you can see what the code do. 

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

Sparky85 wrote:
But that is not the focus of this discussion at this time.

 

Then WTF IS the discussion at this time?  I went through some of your past posts/threads, and all you seem to want to do is bitch about how poor Atmel products are.  If they suck so bad then WHY the hell use them?  Go with ANYONE else's parts if the tools are so bad.  OR, purchase an IAR license where for the price you can expect the world if you want.....and they should deliver.

 

 

Sparky85 wrote:
Yes I know not to use "+". It is as the code as was written, and trying to run as presented by the author. I would prefer to use | or |= for the bits mentioned.

It could quite possibly be that the author made a mistake on the code?  Would not be the first time we have found that.

 

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

I was talking about AS4 not my coding ability.

Your avatar fits your disposition. Please control yourself and stop your personal attacks. People change, try it sometime.

I have read many posts here where many derail the topic and engage in useless in-fighting and diatribe unrelated to the original post. This helps nobody.

If you assume I like other products more than Atmel then YOU ARE WRONG.

If you cannot observe the view of someones observances, concerns and notations of errors, I suggest you refrain from frivolous haranguing of said individuals.

Last Edited: Tue. Aug 20, 2019 - 07:56 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sparky85 wrote:
As I have stated, Simulator in debug mode.

Where?

 

I'm out, don't need the abuse!

Hope you get your project working.

 

Jim

 

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

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

Sparky85 wrote:
If you cannot observe the view someones observances, concerns and notations of errors, I suggest you refrain from frivolous haranguing of said individuals.

No problem, May someday you accept that nothing is perfect and that your arrogance in pointing said imperfections shows how narrow minded you are as well.

 

I wish you and your self riotousness to a long and happy existence. 

 

I will bother, and frivolous haranguing you no more.

 

All the best

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Why are you fiddling with the simulator in the first place? ...just put your code in a chip & have at it.   Doubt I've used the simulator more than once or twice in the last decade.  However, that's partly because the exterior signals (sensors, etc) keep doing their thing, so stepping along through code rarely provided any sensible or useful results.

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

The simulator is also very little help if you rely on a 32768Hz crystal for interrupt ticks. I use the simulator, when I can but, in late stage development, it is much less helpful.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net