EmbeddedRelated.com
Forums
Memfault Beyond the Launch

real-time clock in code composer

Started by guus_hiddink January 20, 2016
I wrote some code, but now I need to include LCD to display time. I have problem with that. Can you give me some advice ? 
On Thu, 28 Jan 2016 02:56:49 -0800, Nikola Gvozdenovic wrote:

> I wrote some code, but now I need to include LCD to display time. I have > problem with that. Can you give me some advice ?
You are giving us absolutely no particulars -- it's like telling us you need to build a house and how should you do it, but you won't say whether you have wood or brick or stone to build with, you won't say how big a house you want, what climate you live in, whether your lot is level or steeply sloped, rocky or sandy, etc. So the ONLY thing I can say is what I said before: look at the documentation for the board, get the brand & model of the LCD, and learn how that works. If you post the part number of the LCD, or failing that if you post the signal names going into it and the number of pins, then someone may have more to say. Is it an alphanumeric LCD, probably with dot-matrix characters, or is it a numerical-only LCD with 7-segment characters? -- www.wescottdesign.com
Tim Wescott <tim@seemywebsite.com> writes:

> On Thu, 28 Jan 2016 02:56:49 -0800, Nikola Gvozdenovic wrote: > >> I wrote some code, but now I need to include LCD to display time. I have >> problem with that. Can you give me some advice ? > > You are giving us absolutely no particulars -- it's like telling us you > need to build a house and how should you do it, but you won't say whether > you have wood or brick or stone to build with, you won't say how big a > house you want, what climate you live in, whether your lot is level or > steeply sloped, rocky or sandy, etc. > > So the ONLY thing I can say is what I said before: look at the > documentation for the board, get the brand & model of the LCD, and learn > how that works. > > If you post the part number of the LCD, or failing that if you post the > signal names going into it and the number of pins, then someone may have > more to say. > > Is it an alphanumeric LCD, probably with dot-matrix characters, or is it > a numerical-only LCD with 7-segment characters?
God you're patient... -- Randy Yates, DSP/Embedded Firmware Developer Digital Signal Labs http://www.digitalsignallabs.com
> I need to write code that works on development board RS MSP430F5438A
Hardly anybody writes code from scratch these days. Chip vendors usually supply plenty of code to get customers started. It's rarely high quality but it goes a long way to getting you started. Use Google to find "MSP430F5438 Experimenter Board". You'll find: http://www.ti.com/tool/msp-exp430f5438 Scour that web page for example code. There should be everything you need. Code development is impractical without HW with which to test. If your teacher is grading you on working code and your grade can mean the difference between getting a pro job or not in the future, I recommend you find $175 and buy the board. Otherwise, find a loaner. Failing all that, at least get your project building successfully in CCS. I can guarantee it won't work the first time you download it to the target. You would iterate possibly hundreds of times. That's how most people write firmware. You've got a lot of work to do and a huge learning curve to climb. We've all been there. Good luck. JJS
On Thu, 28 Jan 2016 18:13:24 -0800, John Speth wrote:

>> I need to write code that works on development board RS MSP430F5438A > > Hardly anybody writes code from scratch these days. Chip vendors > usually supply plenty of code to get customers started. It's rarely > high quality but it goes a long way to getting you started. > > Use Google to find "MSP430F5438 Experimenter Board". You'll find: > > http://www.ti.com/tool/msp-exp430f5438 > > Scour that web page for example code. There should be everything you > need. Code development is impractical without HW with which to test. If > your teacher is grading you on working code and your grade can mean the > difference between getting a pro job or not in the future, I recommend > you find $175 and buy the board. Otherwise, find a loaner. > > Failing all that, at least get your project building successfully in > CCS. I can guarantee it won't work the first time you download it to > the target. You would iterate possibly hundreds of times. That's how > most people write firmware. > > You've got a lot of work to do and a huge learning curve to climb. We've > all been there. Good luck.
I get a sense, perhaps erroneous, that the guy isn't in the US. There are places where $175 is quite prohibitive. It may be that all the instructor wants is for people to dig up example code, compile it, load it, and try it. This is actually not a trivial thing for a really basic class, or at least not for a first experiment in a really basic class. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 29.1.16 23:45, Tim Wescott wrote:
> On Thu, 28 Jan 2016 18:13:24 -0800, John Speth wrote: > >>> I need to write code that works on development board RS MSP430F5438A >> >> Hardly anybody writes code from scratch these days. Chip vendors >> usually supply plenty of code to get customers started. It's rarely >> high quality but it goes a long way to getting you started. >> >> Use Google to find "MSP430F5438 Experimenter Board". You'll find: >> >> http://www.ti.com/tool/msp-exp430f5438 >> >> Scour that web page for example code. There should be everything you >> need. Code development is impractical without HW with which to test. If >> your teacher is grading you on working code and your grade can mean the >> difference between getting a pro job or not in the future, I recommend >> you find $175 and buy the board. Otherwise, find a loaner. >> >> Failing all that, at least get your project building successfully in >> CCS. I can guarantee it won't work the first time you download it to >> the target. You would iterate possibly hundreds of times. That's how >> most people write firmware. >> >> You've got a lot of work to do and a huge learning curve to climb. We've >> all been there. Good luck. > > I get a sense, perhaps erroneous, that the guy isn't in the US. There > are places where $175 is quite prohibitive. > > It may be that all the instructor wants is for people to dig up example > code, compile it, load it, and try it. This is actually not a trivial > thing for a really basic class, or at least not for a first experiment in > a really basic class.
The messages seem to be originated from the network of University of Serbia, Belgrade. If this is a first try for the student, there are too many moving parts in it, IMHO. -- -TV
On Sat, 30 Jan 2016 10:31:42 +0200, Tauno Voipio wrote:

> On 29.1.16 23:45, Tim Wescott wrote: >> On Thu, 28 Jan 2016 18:13:24 -0800, John Speth wrote: >> >>>> I need to write code that works on development board RS MSP430F5438A >>> >>> Hardly anybody writes code from scratch these days. Chip vendors >>> usually supply plenty of code to get customers started. It's rarely >>> high quality but it goes a long way to getting you started. >>> >>> Use Google to find "MSP430F5438 Experimenter Board". You'll find: >>> >>> http://www.ti.com/tool/msp-exp430f5438 >>> >>> Scour that web page for example code. There should be everything you >>> need. Code development is impractical without HW with which to test. >>> If your teacher is grading you on working code and your grade can mean >>> the difference between getting a pro job or not in the future, I >>> recommend you find $175 and buy the board. Otherwise, find a loaner. >>> >>> Failing all that, at least get your project building successfully in >>> CCS. I can guarantee it won't work the first time you download it to >>> the target. You would iterate possibly hundreds of times. That's how >>> most people write firmware. >>> >>> You've got a lot of work to do and a huge learning curve to climb. >>> We've all been there. Good luck. >> >> I get a sense, perhaps erroneous, that the guy isn't in the US. There >> are places where $175 is quite prohibitive. >> >> It may be that all the instructor wants is for people to dig up example >> code, compile it, load it, and try it. This is actually not a trivial >> thing for a really basic class, or at least not for a first experiment >> in a really basic class. > > > The messages seem to be originated from the network of University of > Serbia, Belgrade.
I suspect -- but don't know -- that between cost-of-living differences and the difficulty of importing stuff, that a $175 board from Microchip is going to require a student to flip a hell of a lot more burgers in Belgrade, Serbia than in the average same-sized city in the US*.
> If this is a first try for the student, there are too many moving parts > in it, IMHO.
Agreed. Nikola, if you're still reading, ASK THE INSTRUCTOR. Instructors do ask for unreasonable things sometimes, but sometimes they have something perfectly reasonable and it just comes out sounding odd. * I was going to choose a "Belgrade" somewhere in the US -- but the six that Wikipedia mentions are all out in the boonies in states, and may require as many burgers flipped for that board as Belgrade, Serbia. Probably not, but maybe. -- www.wescottdesign.com
On 30.1.16 19:37, Tim Wescott wrote:
> On Sat, 30 Jan 2016 10:31:42 +0200, Tauno Voipio wrote: > >> On 29.1.16 23:45, Tim Wescott wrote: >>> On Thu, 28 Jan 2016 18:13:24 -0800, John Speth wrote: >>> >>>>> I need to write code that works on development board RS MSP430F5438A >>>> >>>> Hardly anybody writes code from scratch these days. Chip vendors >>>> usually supply plenty of code to get customers started. It's rarely >>>> high quality but it goes a long way to getting you started. >>>> >>>> Use Google to find "MSP430F5438 Experimenter Board". You'll find: >>>> >>>> http://www.ti.com/tool/msp-exp430f5438 >>>> >>>> Scour that web page for example code. There should be everything you >>>> need. Code development is impractical without HW with which to test. >>>> If your teacher is grading you on working code and your grade can mean >>>> the difference between getting a pro job or not in the future, I >>>> recommend you find $175 and buy the board. Otherwise, find a loaner. >>>> >>>> Failing all that, at least get your project building successfully in >>>> CCS. I can guarantee it won't work the first time you download it to >>>> the target. You would iterate possibly hundreds of times. That's how >>>> most people write firmware. >>>> >>>> You've got a lot of work to do and a huge learning curve to climb. >>>> We've all been there. Good luck. >>> >>> I get a sense, perhaps erroneous, that the guy isn't in the US. There >>> are places where $175 is quite prohibitive. >>> >>> It may be that all the instructor wants is for people to dig up example >>> code, compile it, load it, and try it. This is actually not a trivial >>> thing for a really basic class, or at least not for a first experiment >>> in a really basic class. >> >> >> The messages seem to be originated from the network of University of >> Serbia, Belgrade. > > I suspect -- but don't know -- that between cost-of-living differences > and the difficulty of importing stuff, that a $175 board from Microchip > is going to require a student to flip a hell of a lot more burgers in > Belgrade, Serbia than in the average same-sized city in the US*. > >> If this is a first try for the student, there are too many moving parts >> in it, IMHO. > > Agreed. Nikola, if you're still reading, ASK THE INSTRUCTOR. > Instructors do ask for unreasonable things sometimes, but sometimes they > have something perfectly reasonable and it just comes out sounding odd. > > * I was going to choose a "Belgrade" somewhere in the US -- but the six > that Wikipedia mentions are all out in the boonies in states, and may > require as many burgers flipped for that board as Belgrade, Serbia. > Probably not, but maybe.
Ouch, sorry. I meant Serbia, in former Yugoslavia. I did not think that many of the Old World placenames are reused in the US. IIRC, there are Moscow and Melbourne within a few miles under way from NY City to upstate NY. -- -TV
On Sat, 30 Jan 2016 23:12:32 +0200, Tauno Voipio wrote:

> On 30.1.16 19:37, Tim Wescott wrote: >> On Sat, 30 Jan 2016 10:31:42 +0200, Tauno Voipio wrote: >> >>> On 29.1.16 23:45, Tim Wescott wrote: >>>> On Thu, 28 Jan 2016 18:13:24 -0800, John Speth wrote: >>>> >>>>>> I need to write code that works on development board RS >>>>>> MSP430F5438A >>>>> >>>>> Hardly anybody writes code from scratch these days. Chip vendors >>>>> usually supply plenty of code to get customers started. It's rarely >>>>> high quality but it goes a long way to getting you started. >>>>> >>>>> Use Google to find "MSP430F5438 Experimenter Board". You'll find: >>>>> >>>>> http://www.ti.com/tool/msp-exp430f5438 >>>>> >>>>> Scour that web page for example code. There should be everything >>>>> you need. Code development is impractical without HW with which to >>>>> test. If your teacher is grading you on working code and your grade >>>>> can mean the difference between getting a pro job or not in the >>>>> future, I recommend you find $175 and buy the board. Otherwise, >>>>> find a loaner. >>>>> >>>>> Failing all that, at least get your project building successfully in >>>>> CCS. I can guarantee it won't work the first time you download it >>>>> to the target. You would iterate possibly hundreds of times. >>>>> That's how most people write firmware. >>>>> >>>>> You've got a lot of work to do and a huge learning curve to climb. >>>>> We've all been there. Good luck. >>>> >>>> I get a sense, perhaps erroneous, that the guy isn't in the US. >>>> There are places where $175 is quite prohibitive. >>>> >>>> It may be that all the instructor wants is for people to dig up >>>> example code, compile it, load it, and try it. This is actually not >>>> a trivial thing for a really basic class, or at least not for a first >>>> experiment in a really basic class. >>> >>> >>> The messages seem to be originated from the network of University of >>> Serbia, Belgrade. >> >> I suspect -- but don't know -- that between cost-of-living differences >> and the difficulty of importing stuff, that a $175 board from Microchip >> is going to require a student to flip a hell of a lot more burgers in >> Belgrade, Serbia than in the average same-sized city in the US*. >> >>> If this is a first try for the student, there are too many moving >>> parts in it, IMHO. >> >> Agreed. Nikola, if you're still reading, ASK THE INSTRUCTOR. >> Instructors do ask for unreasonable things sometimes, but sometimes >> they have something perfectly reasonable and it just comes out sounding >> odd. >> >> * I was going to choose a "Belgrade" somewhere in the US -- but the six >> that Wikipedia mentions are all out in the boonies in states, and may >> require as many burgers flipped for that board as Belgrade, Serbia. >> Probably not, but maybe. > > > Ouch, sorry. I meant Serbia, in former Yugoslavia. I did not think that > many of the Old World placenames are reused in the US.
I wasn't criticizing you -- Belgrade Montana exists, but I don't think there's a satellite campus of the University of Serbia in it. Ditto the other five. Most big (or famous) old-world cities have US cities or towns named after them. I grew up in Damascus, Oregon, within driving distance of Portland, so there's two old-world place names that were reused right there. Granted, when Portland got its name it was named after Portland Maine (it came down to a coin toss between Portland and Boston), but Portland Maine (and Boston Massachusetts) were both named after the towns in England. -- www.wescottdesign.com
On Friday, January 29, 2016 at 10:46:04 PM UTC+1, Tim Wescott wrote:
> On Thu, 28 Jan 2016 18:13:24 -0800, John Speth wrote: > > >> I need to write code that works on development board RS MSP430F5438A > > > > Hardly anybody writes code from scratch these days. Chip vendors > > usually supply plenty of code to get customers started. It's rarely > > high quality but it goes a long way to getting you started. > > > > Use Google to find "MSP430F5438 Experimenter Board". You'll find: > > > > http://www.ti.com/tool/msp-exp430f5438 > > > > Scour that web page for example code. There should be everything you > > need. Code development is impractical without HW with which to test. If > > your teacher is grading you on working code and your grade can mean the > > difference between getting a pro job or not in the future, I recommend > > you find $175 and buy the board. Otherwise, find a loaner. > > > > Failing all that, at least get your project building successfully in > > CCS. I can guarantee it won't work the first time you download it to > > the target. You would iterate possibly hundreds of times. That's how > > most people write firmware. > > > > You've got a lot of work to do and a huge learning curve to climb. We've > > all been there. Good luck. > > I get a sense, perhaps erroneous, that the guy isn't in the US. There > are places where $175 is quite prohibitive. > > It may be that all the instructor wants is for people to dig up example > code, compile it, load it, and try it. This is actually not a trivial > thing for a really basic class, or at least not for a first experiment in > a really basic class. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com
I wrote code for my application, two versions. First one uses the interrupt routine for buttons,and second one periodically checks the state of pins where are buttons. I have question for first version. Can I use flags as conditions for each button in interrupt routine,e.g. #pragma vector=PORT2_VECTOR __interrupt void port2handler(void) { if(P2IFG & BIT4) // button for settings is pressed { // something to do P2IFG &= ~BIT4; // clear flag} } I will test the project 2/6/2016, so I don't know now if that works. Is that way of interrupt routine make sense? Thanks

Memfault Beyond the Launch