I2C Firmware Code for TI MSP430F2013

I'm currently searching the coder (firmware) who has experience with I2C bus. I am looking for firmware solutions for my prototype that will be used in manufacturing testing for I2C LED Modules. Each module contains six of TPIC2810 LED Driver chips with Address from

1100000X to 1100101X. All of 8 outputs for each LED Driver are loaded with LED. I need to use LED Display Module for displaying the counters located at MSP430F2013 Microcontroller. Each LED Display Module has two push-buttons. Pressing on one of push-buttons will generate interrupt for MSP430F2013 Microcontroller. PCA9542A I2C switch with interrupt manager is used to detect the source of interruption. Each interruption from push-buttons will update the counter by increasing or decreasing the previous value depending on which push-button was pressed. I2C switch is used to manage multiple-module structure on I2C bus.

The firmware code must be written for MSP430F2013 chip from Texas Instruments. MSP430F2013 chip is part of eZ430-F2013, a USB stick- based full emulation and development tool from Texas Instruments. I am going to supply with schematics, algorithms and block-diagrams. The resulting code must be written in C/C++ and assembler. The code must have commentary for each line of code. The code should be written to be used only with tools form Texas Instruments as a part of eZ430-F2013 KIT:

  1. IAR Embedded Workbench Kickstart 4.0 (Free 4KB IDE)
  2. TI Code Composer Essentials Evaluation v2.0 (Free 8KB IDE) FET
  3. TI Code Composer Essentials Professional v2.0 (Unlimited Code Space)

Code examples:

formatting link
(39245)

Reply to
mInfo
Loading thread data ...

Sounds like this is a school project. If it was a valid contract job, you would not have nonsensical requirements like the above.

Reply to
larwe

Did you say "nonsensical requirements like the above"? Have you ever paid attention when you were reading the text? It says absolutely clear "testing code" to test the prototype only. Yes, it has to be at 'school project' level, simple code to test the hardware.

Reply to
mInfo

"nonsensical requirements like the above"? Have you ever

Yes. And, like most other people in this NG, I have experience doing an awful lot of school projects. I also have experience doing an awful lot of customer projects for people who don't know what the buzzwords they are using actually mean.

If you had written "adequately commented code developed with free tools" I would not have had a problem.

I'd still bet money that this is a school project cut and pasted from your homework sheet, but I'll grant the outside possibility that it is a legitimate (though unpalatable) contract and you are simply regurgitating specification bullet points you don't really understand.

Reply to
larwe

In 25 years I have never actually seen code with every line commented. Ever.

Reply to
Elan Magavi

Me neither, though unfortunately I HAVE seen the opposite extreme more than once :) Even worse is code like this:

write_i2c(0x68, 0xff); // write 0x27 to register 0x05 (turn off speaker)

where the comment belongs to a source line that was cut and pasted for use elsewhere; the args were changed but the comment was never updated. I see a lot of this sort of thing.

The OP's request would of course not present much of a problem; I can easily write a little program to add a comment to every single line in the source.

Hmm. Does a macro count as code? Actually, what's a line? If I simply put a backslash at the end of every C line, does that mean I can use a single comment for the entire source file?

Reply to
larwe

Hide quoted text -

"In 25 years I have never actually seen code with every line commented. Ever." Me neither in my 30 years of seeing the code. Are you guys just looking for the subject to discuss, have nothing else to do? You've gotten it! It is absolutely obvious for everyone that it was a typo in my message, that's all. The subject is closed now :) Who needs every line commented (or any extra information for that matter) anyway in our timeframe-limited life style? What's going to be next?

Reply to
mInfo

Ok.. just be more careful in the future. ;)

Reply to
Elan Magavi

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.