N3TL0@D3R 0 Posted March 8, 2012 Share Posted March 8, 2012 Hello everyone, so, i finally have the time to work on my launchpad. I've been reading some things and i have a question. this line: :arrow: #include i have to use this only if i'm using the chip msp430g2231 or it's jut for "importing" a command or that chip functionality. Thank you or your answer. Quote Link to post Share on other sites
chibiace 46 Posted March 8, 2012 Share Posted March 8, 2012 have a look at the file, it defines quite a bit of stuff. while its always best to have the matching header a lot of the functionality is the same for the range and you can get away with a similar chip like the msp430g2001. or the f series. on my linux box the header is also calling for these: #include #include #include #include #include #include N3TL0@D3R 1 Quote Link to post Share on other sites
bluehash 1,581 Posted March 9, 2012 Share Posted March 9, 2012 It's the header file for that particular chip which maps #defines to appropriate peripheral addresses. Just a small suggestion since you asked this kind of question... it would be better if you read up on the basics of C first. You already come from a programming background(Web), so it should not be too hard. This will only help you later. Welcome to the Forums. Keep asking your questions. N3TL0@D3R 1 Quote Link to post Share on other sites
N3TL0@D3R 0 Posted March 9, 2012 Author Share Posted March 9, 2012 Thank you both for your answers. It's the header file for that particular chip which maps #defines to appropriate peripheral addresses. Just a small suggestion since you asked this kind of question... it would be better if you read up on the basics of C first. You already come from a programming background(Web), so it should not be too hard. This will only help you later. Welcome to the Forums. Keep asking your questions. Thanks, i use c a lot and also learn that before php, i have this doubt with the include because i was set on this: if the launchpad came with the 430g2553 why are they using this? is it like math.h an they include this to use #pragma vector or they actually using this other chip. Quote Link to post Share on other sites
gordon 229 Posted March 10, 2012 Share Posted March 10, 2012 The LP used to come with a '2211 and a '2231, the TI examples are written for those. You'll need some creativity porting them to the '2553, but it's quite doable with a bit of thinking and consulting the appropriate headers (msp430g2231.h and msp430g2553.h in this case). It's going to be register name differences mostly. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.