Pages: [1]   Go Down
Author Topic: does the ATTINY2313 support if,else function?  (Read 990 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 0
Posts: 298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made a program with the If/Else function (9 of those functions in the program) and I used and ATTINY2313 with the code and it doesn't seem to work...so does the ATtiny2313 support if,else function?

Thanks
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4095
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure it does. If/Else is a feature of the programming language, not the hardware.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1619
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Definitely It supports , as defined earlier its the compiler that supports IF condition's anyway chip is to be flashed with binary instructions only so it doesn't care about IF else your compiler does.
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Offline Offline
Sr. Member
****
Karma: 0
Posts: 298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

because I read articles online that say that the ATTINY chips do not work with all the functions of the arduino so I was not sure  if the IF/Else function was supported....
Have any of u used the IF function on the ATTINY2313?
Thanks
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

because I read articles online that say that the ATTINY chips do not work with all the functions of the arduino

Which articles?

Quote
Have any of u you used the IF function on the ATTINY2313?

Yes.

You may want to replace your keyboard.  The "y" and "o" keys appear to be acting-up.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Check your code, maybe you have = when you need == to test for conditions.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1619
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@ Vishal , then you have to again check for other articles that define condensing of your project using ATTiny85! yes an ATTiny ,if you think ATTiny 2313 is too diff. to be worked as a ATTiny85 and ATTiny45 check out its Datasheet for any discrepancies.
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made a program with the If/Else function (9 of those functions in the program) and I used and ATTINY2313 with the code and it doesn't seem to work...so does the ATtiny2313 support if,else function?

Thanks

I suggest you post your code.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Check your code, maybe you have = when you need == to test for conditions.
I just checked the code and realized that I had a = instead of  == in one part of the code..  smiley-razz I changed it and it is working now  smiley-lol
Thanks
Logged

Pages: [1]   Go Up
Jump to: