real-time clock in code composer

I need to write a program that implements a real-time clock in code composer studio. The LCD display shows hours , minutes and seconds . By pressing a button you can enter / exit in setting mode which is characterized by on / off LED. Pressing one of the other three keys in setting mode you can set hours , minutes and seconds . Can someone help me?

--------------------------------------- Posted through

formatting link

Reply to
guus_hiddink
Loading thread data ...

Code Composer Studio is a development environment, not a processor. You need to first select one of TI's processors, MCUs, or SoCs.

The MSP430F5438 Experimenter Board would be a good choice, in my opinion, and lacking further information:

formatting link

Good luck!

--
Randy Yates, DSP/Embedded Firmware Developer 
Digital Signal Labs 
http://www.digitalsignallabs.com
Reply to
Randy Yates

I think it's his professor that decides the processor...

Bye Jack

Reply to
Jack

Very possibly, if he has a professor.

--
Randy Yates, DSP/Embedded Firmware Developer 
Digital Signal Labs 
http://www.digitalsignallabs.com
Reply to
Randy Yates

It sounds like homework, and you're not giving enough detail.

So -- no one's going to write code for you.

The first thing you need is more detail, either to get answers or to do the project yourself.

Do you have a schematic? Do you know what LCD you have? Do you know what processor pin is connected to the LED? Do you know whether that pin needs to be low or high to light the LED? Do you know what processor pins are connected to buttons? Do you know what the pin voltages are when the buttons are pressed vs. not pressed? Do you know how the various processor pins map to ports on the processor?

If this is homework, you should have been given some pretty strong clues to this in your coursework, or in a prior course.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

I need to write code that works on development board RS MSP430F5438A, but I don't have board or any hardware to test code many times, so that is a pro blem. Only is specified that code works on development board RS MSP430F5438 A. Any help would be precious to me. Thanks

Reply to
dzonikv93

Start by using the documentation of the board to find the answers to all of the questions I gave you.

Then chase down the documentation on the LCD, to figure out how to drive it.

See if there is demo software for the board that you can look at to learn how it's done.

It's unfortunate that you don't have a board to experiment on -- do you have the resources to get one for yourself?

--
www.wescottdesign.com
Reply to
Tim Wescott

Ok, thanks. I don't have resources.

Reply to
Nikola Gvozdenovic

If you change your screen name one more time in this thread I'm not going to answer, and I suspect that no one else will, either. Look up "rude" in the dictionary if you don't understand.

If you have access to the web you can certainly look at the board documentation. You'll get exactly nowhere if you don't do your homework.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

I understood that you think to get or buy the board. I changed the screan name accidentally, sorry.

Reply to
Nikola Gvozdenovic

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 ?

Reply to
Nikola Gvozdenovic

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
Reply to
Tim Wescott

God you're patient...

--
Randy Yates, DSP/Embedded Firmware Developer 
Digital Signal Labs 
http://www.digitalsignallabs.com
Reply to
Randy Yates

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:

formatting link

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

Reply to
John Speth

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
Reply to
Tim Wescott

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
Reply to
Tauno Voipio

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*.

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
Reply to
Tim Wescott

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
Reply to
Tauno Voipio

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
Reply to
Tim Wescott

f
e

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 w here are buttons. I have question for first version. Can I use flags as con ditions 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 tha t way of interrupt routine make sense? Thanks

Reply to
Nikola Gvozdenovic

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.