From ers69 at msstate.edu Tue Dec 2 13:31:26 2008 From: ers69 at msstate.edu (Gene Sandberg) Date: Tue Dec 2 13:50:49 2008 Subject: [ece4723] study questions In-Reply-To: <19247795.328611228106234943.JavaMail.root@zimbra.ece.msstate.edu> References: <33531605.328591228106208851.JavaMail.root@zimbra.ece.msstate.edu> <19247795.328611228106234943.JavaMail.root@zimbra.ece.msstate.edu> Message-ID: Greetings, In an effort to save time for everyone and help each other out I suggest that everyone mail out the answers to their respective questions to the class. Since some of the questions have been changed it is important to realize that the answers might not be exactly the same. But it should at least get everyone on the right track. We talked to Bruce and he said that he was fine with us sharing our answers as long as we shared with the whole class. The class email list is ece4723@ece.msstate.edu Thanks for your help Gene My questions and answers: Question: What are the limitations on ESOS ?threads?? Answer: Automatic variables(stack variables) not saved across a blocking wait. Limitation inherited from the event-driven model Programmer must manually save automatic variables Static local variables still work as expected though you have to ?static? all variables you want to preserve across any yielding/waiting statement! Question: What are the three basic functions of semaphores and how do they work together. Answer: 1) init(value). This function sets the initial value of the semaphore. This value is the number of units of the resource that are free. 2) signal(value). This functions increments the count of the semaphore, which states that another unit of resource is free. 3) wait(value). This functions waits for a resource to be free. If there are already a unit free it decrements the count to show that a unit is now being used. From trc67 at msstate.edu Tue Dec 2 14:57:11 2008 From: trc67 at msstate.edu (trc67@msstate.edu) Date: Tue Dec 2 15:01:29 2008 Subject: [ece4723-01] [ece4723] study questions In-Reply-To: References: <33531605.328591228106208851.JavaMail.root@zimbra.ece.msstate.edu> <19247795.328611228106234943.JavaMail.root@zimbra.ece.msstate.edu> Message-ID: <1228251431.4935a127ac253@webmail.msstate.edu> 1.In designing low-power embedded systems: a)What types of questions should you ask the customer before beginning design, and why? (name three) How small can it be? rather than how large. How slow can it be? rather than how fast. What is the minimum battery life? instead of how long should it last. What is the minimum I/O required? In general, avoid questions pertaining to physical dimensions in favor of questions about the product's intended use. Otherwise, the customer will likely specify an impossibly small, impossibly powerful device that lasts forever without batteries. b)Define ?zombies? and discuss why they occur. Zombies are components in an embedded system that are turned off but have inputs that are still being driven. Under these conditions a chip's logic can produce an output even though the chip itself is not on. Often this output is incorrect and can lead to an error in the overall logic of the embedded system. 2.Discuss the pros and cons of using primary vs. secondary cell batteries in a design. Primary batteries have: a higher energy density a much slower self-discharge rate lower cost Secondary batteries: can be recharged can better handle high current draw need to be replaced much less often >> _______________________________________________ >> ece4723-01 mailing list >> ece4723-01@ece.msstate.edu >> http://www.ece.msstate.edu/mailman/listinfo/ece4723-01 >> From jtw119 at msstate.edu Tue Dec 2 14:59:43 2008 From: jtw119 at msstate.edu (Josh Wilson) Date: Tue Dec 2 15:01:29 2008 Subject: [ece4723] ECE4723 answers Message-ID: State the Pareto Principle; and give two examples of it in action. 80% of desired result can be obtained with 20% of the effort. -~4% of code accounts for >50% of its execution time. -One 1KLoC program spent 80% of its time in five LoC. My second question was the same as Gene's. Josh From jab647 at msstate.edu Tue Dec 2 15:05:23 2008 From: jab647 at msstate.edu (Jacob Bowen) Date: Tue Dec 2 15:06:21 2008 Subject: [ece4723] ECE4723 Exam Study Q&A Message-ID: <7f825bbf0812021305m4ce279fan988122a1ff37bb06@mail.gmail.com> Here are my questions and answers: Question: Given the following macros (defined in eeprom_24lc515.h) and the esos_pic24_configI2C1() function, configure the I2C module with a 400 kHz clock speed. Then, write (and register) an ESOS task for the PIC24 to get 3 bytes of data from the Microchip 24LC515 serial EEPROM device. Macros: EEPROM_ADDR // The I2C address of the EEPROM device ADDR_MSB // The MSB of the EEPROM internal memory to read from ADDR_LSB // The LSB of the EEPROM internal memory to read from Solution: #include "eeprom_24lc515.h" /* Prototype */ ESOS_USER_TASK(i2c_read_data); ESOS_USER_TASK(i2c_read_data) { static uint8 au8_incomingData[3]; ESOS_TASK_BEGIN(); /* Set the address to read data from on the EEPROM device and then begin reading */ ESOS_TASK_WAIT_ON_WRITE2I2C1(EEPROM_ADDR, ADDR_MSB, ADDR_LSB); ESOS_TASK_WAIT_ON_READNI2C1(EEPROM_ADDR, u8_incomingData[0], \ u8_incomingData[1], u8_incomingData[2]); ESOS_TASK_END(); } void user_init(void) { esos_pic24_configI2C1(400); // Configure I2C for 400 kHz esos_RegisterTask(i2c_read_data); } Question: The "twisted tradeoff" represented in the diagram above (See the document that Dr. Bruce e-mailed to us) implies that during product development either a project's schedule, overall quality, or number of features, must be compromised initially. Which of the three does Jack Ganssle suggest a developer should compromise to achieve long term success and why? Solution: In The Art of Designing Embedded Systems Ganssle says that it is best to "cut a few of the less important features to get a first class device to market fast." A developer must identify and implement the required features first, making sure that each feature is implemented correctly. In doing this the development team has a clear view of the project's status and a functioning version of the product is always ready whenever management decides that the product needs to be shipped. This allows the company to maximize the profit window for the product because the "time-to-market" is effectively reduced. - Jacob Bowen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081202/d24b744b/attachment.html From pcd15 at saffairs.msstate.edu Tue Dec 2 17:47:43 2008 From: pcd15 at saffairs.msstate.edu (Patrick Duckworth) Date: Wed Dec 3 08:15:24 2008 Subject: [ece4723] Exam Questions Message-ID: <493574BF0200000B0000790E@mailhost2.groupwise.msstate.edu> Attached -------------- next part -------------- A non-text attachment was scrubbed... Name: questions.doc Type: application/octet-stream Size: 41472 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081202/91e14c0a/questions-0001.obj From jrb258 at msstate.edu Tue Dec 2 20:28:19 2008 From: jrb258 at msstate.edu (Jonathan Bryant) Date: Wed Dec 3 08:15:24 2008 Subject: [ece4723-01] [ece4723] ECE4723 answers In-Reply-To: Message-ID: <200812030228.mB32SK9U030498@chokecherry.its.msstate.edu> Problem 1: In a code review meeting, what are the responsibilities of the moderator, reader, recorder, and author? Moderator - plans the meeting and reviews any follow-up work. Reader - paraphrases the code and interrupts the functions for the team. Recorder - notes the found minor and major errors. Author - understand the found errors and explain unclear areas of code. The author does not defend the code in review. Problem 2: What are the pitfalls to using global variables? Break the principle of information hiding. Globals can be unexpectedly stepped on by anyone. Globals destroy reuse. Globals lead to strong coupling. If a global variable changes, references to that global must be tracked down and changed as well. - Jonathan From fah1 at msstate.edu Wed Dec 3 08:49:01 2008 From: fah1 at msstate.edu (Frank Holland) Date: Wed Dec 3 08:56:13 2008 Subject: [ece4723] Questions Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: exam_questions.pdf Type: application/pdf Size: 44713 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/e2a9fbdb/exam_questions-0001.pdf From atp46 at msstate.edu Wed Dec 3 09:21:30 2008 From: atp46 at msstate.edu (Alan Pritchard) Date: Wed Dec 3 09:50:36 2008 Subject: [ece4723-01] [ece4723] Questions In-Reply-To: References: Message-ID: <1228317690.4936a3fa6f925@webmail.msstate.edu> Hello, Here are my revised questions from the list he sent back. Alan -------------- next part -------------- A non-text attachment was scrubbed... Name: my questions.doc Type: application/msword Size: 43520 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/5f51e6b7/myquestions-0001.doc From jsb119 at msstate.edu Wed Dec 3 12:16:39 2008 From: jsb119 at msstate.edu (Jeff Brantley) Date: Wed Dec 3 13:25:57 2008 Subject: [ece4723] Exam Questions Message-ID: <4936CD07.9070908@msstate.edu> Hey everybody, Attached are my answers to two of the exam study questions. Note: As I read the first question of the two, I don't think it really makes sense, but take from it what you will. -Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: ExamQuestionsAnswersJsb119.doc Type: application/msword Size: 35328 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/b8bd7cf1/ExamQuestionsAnswersJsb119-0001.doc From kdv24 at msstate.edu Wed Dec 3 12:39:18 2008 From: kdv24 at msstate.edu (Kevin Vu) Date: Wed Dec 3 13:25:58 2008 Subject: [ece4723-01] [ece4723] Exam Questions Message-ID: <4936D256.7070708@msstate.edu> Here are my questions. Vu -------------- next part -------------- A non-text attachment was scrubbed... Name: Embedded Systems Exam Questions.doc Type: application/msword Size: 81920 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/41332846/EmbeddedSystemsExamQuestions-0001.doc From dmw132 at msstate.edu Wed Dec 3 13:57:13 2008 From: dmw132 at msstate.edu (Daniel Wilson) Date: Wed Dec 3 13:58:18 2008 Subject: [ece4723-02] [ece4723-01] [ece4723] Exam Questions In-Reply-To: <4936D256.7070708@msstate.edu> References: <4936D256.7070708@msstate.edu> Message-ID: <71ad7d8a0812031157j10c9977bhdf68bf1e65cf9da9@mail.gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: solenoid.png Type: image/png Size: 13651 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/de5e4b0a/solenoid.png From jsb119 at msstate.edu Wed Dec 3 14:00:43 2008 From: jsb119 at msstate.edu (Jeff Brantley) Date: Wed Dec 3 14:04:36 2008 Subject: [ece4723-01] [ece4723] Exam Questions In-Reply-To: <4936CD07.9070908@msstate.edu> References: <4936CD07.9070908@msstate.edu> Message-ID: <4936E56B.1040207@msstate.edu> To clarify, the first of these questions (the ADC semaphore one) omits too much detail. The following edit (apply to both tasks appropriately) reveals something sensible. ------------------------------------------------------------------------ ESOS_USER_TASK( exterior_temperature ) { ESOS_TASK_BEGIN(); while(TRUE) { ESOS_TASK_WAIT_SEMAPHORE(sem_ADCAvailable, 1); /* Configure ADC for pin AN1, then save control signal state */ __configADC1_ManualCH0(ADC_CH0_POS_SAMPLEA_AN1, 31, ADC_USE_12BIT); ESOS_TASK_WAIT_TICKS(50); u8_controlSignalBefore = CONTROL_SIGNAL; /* Perform an ADC conversion */ SET_SAMP_BIT_ADC1(); ESOS_TASK_WAIT_UNTIL(IS_CONVERSION_COMPLETE_ADC1()); /* Save control signal state post-conversion, and save result */ u8_controlSignalAfter = CONTROL_SIGNAL; u16_NewADCValue = ADC1BUF0; ESOS_SIGNAL_SEMAPHORE(sem_ADCAvailable, 1); } /* do some processing that does not require ESOS WAITS */ ESOS_TASK_END(); } ------------------------------------------------------------------------ The problem before was that it appeared the semaphore never got used because neither task EVER blocked, even during the critical section of code. The code above shows that it does in fact block during the critical section (and thus a semaphore is needed to keep the other task from messing with the ADC), but it still does not block outside of the critical section. Thus, the ESOS_TASK_YIELD() needs to be added in order to keep from starving other tasks. Shoot me an e-mail if this is still confusing. -Jeff Brantley Jeff Brantley wrote: > Hey everybody, > > Attached are my answers to two of the exam study questions. Note: As I > read the first question of the two, I don't think it really makes sense, > but take from it what you will. > > -Jeff > > > ------------------------------------------------------------------------ > > _______________________________________________ > ece4723 mailing list > ece4723@ece.msstate.edu > http://www.ece.msstate.edu/mailman/listinfo/ece4723 > > > ------------------------------------------------------------------------ > > _______________________________________________ > ece4723-01 mailing list > ece4723-01@ece.msstate.edu > http://www.ece.msstate.edu/mailman/listinfo/ece4723-01 From tqd2 at msstate.edu Wed Dec 3 14:18:50 2008 From: tqd2 at msstate.edu (Thomas Donaldson) Date: Wed Dec 3 14:19:43 2008 Subject: [ece4723] My Q&A's Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: ECE4723_TwoExamQ&A.doc Type: application/msword Size: 30720 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/113b660b/ECE4723_TwoExamQA-0001.doc From ers69 at msstate.edu Wed Dec 3 16:59:55 2008 From: ers69 at msstate.edu (Gene Sandberg) Date: Wed Dec 3 17:04:49 2008 Subject: [ece4723] Exam Study Questions Message-ID: This is Jason's Study Questions. He had trouble emailing them. Gene -------------- next part -------------- A non-text attachment was scrubbed... Name: Study Questions.pdf Type: application/pdf Size: 62388 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/f329b884/StudyQuestions-0001.pdf From att22 at msstate.edu Wed Dec 3 17:55:27 2008 From: att22 at msstate.edu (att22@msstate.edu) Date: Thu Dec 4 08:28:16 2008 Subject: [ece4723] Study Questions Message-ID: <1228348527.49371c6f78ee2@webmail.msstate.edu> Question: List the steps of the Waterfall model development cycle (in order). 1. Requirements analysis 2. System specification 3. Architectural design 4. Detailed design 5. Coding and Debugging 6. Unit testing 7. System testing 8. Manufacturing 9. Maintenance 10. Obsolescence From atp46 at msstate.edu Wed Dec 3 18:42:03 2008 From: atp46 at msstate.edu (Alan Pritchard) Date: Thu Dec 4 08:28:17 2008 Subject: [ece4723-01] [ece4723] Exam Questions Message-ID: <1228351323.4937275b0e8ad@webmail.msstate.edu> Hey everyone, We have recently discovered that Alan doesn't know the difference between signed and unsigned. So for the problem: The following variable is named using standard ECE4723 C naming procedures. Give the data type and the range of values possible. i8_distance The answer should be: 8-bit signed integer with a range of -128 to 127 according to the magical http://en.wikipedia.org/wiki/Integer_(computer_science). As a bit more of an apology here are two more answers one of which is very similar to my first problem. Also, if any of you have solutions to any of the problems without answers so far I'm sure everyone would appreciate it if you could post them. We might also be able to notice any mistakes in them. Sorry about that, Alan -------------- next part -------------- A non-text attachment was scrubbed... Name: study questions.doc Type: application/msword Size: 45056 bytes Desc: not available Url : http://www.ece.msstate.edu/pipermail/ece4723/attachments/20081203/e9c0ae1c/studyquestions-0001.doc