From jwbruce at ece.msstate.edu Thu Oct 8 10:10:03 2009 From: jwbruce at ece.msstate.edu (J. W. Bruce) Date: Thu Oct 8 10:10:07 2009 Subject: [ece4723] Re: Task 5 In-Reply-To: <4ACD40AF.1030608@msstate.edu> Message-ID: <20985113.301031255014603841.JavaMail.root@zimbra.ece.msstate.edu> done. ------------------ J.W. Bruce, Ph.D., Associate Professor Department of Electrical and Computer Engineering Mississippi State University 406 Hardy Road, Simrall 335 Mississippi State, MS 39762-9571 Office: (662) 325-1530 FAX: (662) 325-2298 ----- Original Message ----- From: "Vinod Rajan" To: "J. W. Bruce" Sent: Wednesday, October 7, 2009 8:30:23 PM GMT -06:00 US/Canada Central Subject: Task 5 Dr.Bruce, Could you post the presets (A & B) data on the Task 5 page? Also, does it matter on which pin of the PIC18 (which ever is free) is used to generate the control signal? Thanks, Vinod From jwbruce at ece.msstate.edu Wed Oct 21 10:54:26 2009 From: jwbruce at ece.msstate.edu (J. W. Bruce) Date: Wed Oct 21 10:54:35 2009 Subject: [ece4723] Fwd: The Embedded Muse 183 In-Reply-To: <200910191443.n9JEhu5H012444@jade.serverhost.net> Message-ID: <29937822.345571256140466507.JavaMail.root@zimbra.ece.msstate.edu> The latest from Jack..... I especially encourage you to read his little blurb on "failing malloc calls" below. It is really something to think about as you design a real system. Enjoy. jwb ------------------ J.W. Bruce, Ph.D., Associate Professor Department of Electrical and Computer Engineering Mississippi State University 406 Hardy Road, Simrall 335 Mississippi State, MS 39762-9571 Office: (662) 325-1530 FAX: (662) 325-2298 ----- Forwarded Message ----- From: jack@ganssle.com To: tem@freelists.org Sent: Monday, October 19, 2009 9:43:30 AM GMT -06:00 US/Canada Central Subject: The Embedded Muse 183 -------------------------------------------------------------- Embedded Muse 183 Copyright 2009 TGG October 19, 2009 Permanent link to this issue: www.ganssle.com/tem/tem183.pdf -------------------------------------------------------------- You may redistribute this newsletter for noncommercial purposes. For commercial use contact info@ganssle.com. To subscribe or unsubscribe go to http://www.ganssle.com/tem-subunsub.html or drop Jack an email at jack@ganssle.com. EDITOR: Jack Ganssle, jack@ganssle.com CONTENTS: - Editor's Notes - Quotes and Thoughts - Tools and Tips - Static Analysis - More on Debugging - Naming Conventions - Too Much Optimism - Jobs! - Joke for the Week - About The Embedded Muse Editor's Notes -------------- I've been in this industry since the first 8 bit microprocessor appeared. In the intervening years the technology has changed in breathtaking ways. The most radical change, though, is in how the business environment has been driving engineering. I'm not referring to the current economic woes; rather, communications technology has improved so that globally-distributed teams now work together to build a product. When I was a child a long-distance phone call (even one from an adjoining state) was so rare, and so expensive that the household came to a halt as dad took the call. It could take weeks to trade letters with a correspondent in Europe, and few of us knew anyone, other than soldiers, who had traveled outside the US and Canada. Today it's all but free to call any place on the planet, and the Internet means all of our data is always connected. The result: a global competitive environment heretofore unknown that drives management to demand more, better, faster. If you can design an ASIC with 100 million gates and a million lines of C in a month, well, they'll soon demand it in a week. And for good reason, as every company realizes that someone else will be looking for a way to get those kinds of productivity gains. Sure, the economy is bad right now. You're buried in getting a project done and don't have time to find new ways to do things better. I'm reminded of the classic cartoon of a medieval battle being waged with swords and rocks; the general sniffs that he just doesn't have time to see the salesman, who product is a box of machine guns. More, better, faster. I think that's the mantra that will drive this industry for the foreseeable future. How will you achieve those goals? Take a day to learn how to meet that objective. Learn how at my Better Firmware Faster class, presented at your facility. See http://www.ganssle.com/classes.htm . Kevin Fodor implemented some of my debouncing ideas (from http://www.ganssle.com/debouncing.pdf) at this site: https://sites.google.com/site/kfodorprojects/home/electronics-projects-1/hex-switch-debouncer-module . Quotes and Thoughts ------------------- In "A View of the Parallel Computing Landscape" (Communications of the ACM, October 2009) the authors state that over the last 60 yrs the IT industry has improved the cost-performance of sequential computing by about 100 billion times overall. What an astonishing number! Tools and Tips -------------- Archis Bhave recommends Launchy: "www.launchy.net is a keystroke launcher with catalog facility. No more hassles to find where one stored the files, may they be images or data sheets. Runs on Linux (with a source build) and windows both. Can launch installed applications as well." He also likes KiCAD: "kicad.sourceforge.net is an open source and feature rich schematic editor and PCB lay-outing tool. Nice for the schematics, good for designing quick prototypes." Well-known author Jam Axelson suggested three tools: "OpenWide (http://lingo.atspace.com/openwide.html) customizes the File > Open dialog in applications (not just Windows Explorer) to default to the size, position, and view (List, Details, etc.) that you prefer. "Clipmate Clipboard Extender (http://www.thornsoft.com) remembers and manages up to thousands of clipboard items. The PowerPaste feature will easily paste a series of clips in sequence. "Ultramon (http://www.realtimesoft.com/ultramon) helps manage multiple monitors, including easy moving of maximized windows and optional custom taskbars for each monitor." Static Analysis --------------- I'm fascinated by the various static analysis tools that find execution-time bugs without actually running the code. Static analysis can find problems like buffer overflows. The tools go beyond what Lint can find, but do not replace Lint. But how do the tools stack up against each other? A newish paper attempts to answer this question. "A Comparative Study of Industrial Static Analysis Tools by Par Emanuelsson and Ulf Nilsson" (http://www.ep.liu.se/ea/trcis/2008/003/trcis08003.pdf ) is a long (34 pages) but quite interesting and well-written comparison of static analysis tools from Coverity, Parasoft and Klocwork. Well worth reading for those looking into this technology. The authors reach a number of conclusions, but perhaps most interesting is that that each tool finds different bugs! None are cheap, and few can afford the cost to run all of the tools together. Perhaps the ultimate solution is to nationalize these companies and unify the rule sets. Oops - that should be in the jokes section! More on Debugging ----------------- Jef Mangelschots had a comment about my take on debugging from the last Muse: "In my experience with debugging. if you can't explain the bug, you will almost never be able to successfully fix it. "Therefore, you need to (1) reproduce the problem (sometimes difficult), (2) prove the validity of your hypothesis with captured data and, after fixing the problem, (3) prove the validity of the fix with the same method as used to prove the hypothesis. This is usually done with extracting available information (e.g. log files, measurements, ...) or by instrumenting the software exhibiting the problem with extra logging (or any other means of capturing test data). "Also, the most important advice I can give is: a problem is half fixed when you can visualize the problem. Instead of pouring endlessly over raw test data, write a simple filter (I like Python but you can do it in Perl or any other high-level language) that processes the incoming test stream and extracts the information you are interested in and then visualize the conclusions to support your hypothesis. The simplest form is a text output but you can also use CSV output to import into Excel (sky is the limit). Try to show obtained and expected values side-by-side and a general PASS/FAIL outcome. Spend a couple of minutes on the layout of presenting the results. This layout influences the understanding of the problem." Jef's last point is important. Edward Tufte's excellent book "The Visual Display of Quantitative Information" shows how important it is to think carefully about how one presents data. Naming Conventions ------------------ A scrambled paragraph in the last Muse showed how good people are at extracting meaning from massively-misspelled words. Don Peterson wrote a program that does this sort of scrambling - you can get it from http://www.gdssw.com/tools/ . For fun he ran the last issue of this newsletter through it, which is posted here: http://ganssle.com/misc/scrambled-muse.pdf . Too Much Optimism ----------------- In the last issue I wrote: His testosterone came across in the same way exhibited by the crab. Whenever memory was needed, he issued a malloc(), and by God, that was a demand from this programmer to get some memory! Gimme some memory, NOW! A gentler and more robust approach might be to recognize that malloc() has a return code. It might fail. Check the return code and take action if the system is low on resources. Demand memory? No, request it, with a sort of virtual "please", and recognize that it's possible the system will reply, "sorry, there's none available now". John Carter had some objections and a quite interesting take: "NO! NO! NO! NO! "By the time malloc fails, the system is just plain fubared. I hate deeply convoluted error handling code that checks the return code of malloc.... "* Then goes through horrible contortions to attempt to recover sanity. "* And has _never_ been tested. "* And God help it if it either directly, or anywhere else on it's call graph, invokes malloc again! Which it will if it tries to printf anything! "So what is the correct solution? "Wrap malloc in a function that checks the return code, and if it fails uses statically pre-allocated space to log a stack trace, then system error and reboot! "But that sounds just like what you are ranting against! Hear me out to find the correct solution. "What has gone wrong is you have exceeded the design load for that system. Suppose you were told to design a ferry to carry cars. But you couldn't get management to decide how many cars it should carry. So you designed it so you could load any number of cars. "When the ferry starts sinking and taking on water, on every gunwale there is a "water coming in" detector. Attached to each of those detectors is an amazingly complex one-off uniquely-designed gadget which you can't test without sinking a loaded ferry (for many highly customised loads), that flings the last few cars into the water! "One solution is to tell management to get their butts into gear and actually _decide_ on the designed for carrying capacity of the ferry. And then design mechanisms to only allow that many on. "Your customers are OK with knowing that their system can only handle a finite load. "The other solution is to have a "Plimsoll Line", a safety margin and to keep loading until you have reached that level of resource usage and then stop loading. See http://en.wikipedia.org/wiki/Waterline . " Wire into your malloc wrapper a counter of how much space you have used. Once you approach your safety margin, stop loading. Shed load at the periphery. And then LOAD TEST your system. Throw way more load at it than it can possibly handle. It should gracefully refuse to accept more load, or throttle the load to what it can handle. "Resource depletion is _never_ an unexpected condition. But once you have hit resource depletion you "* lack resources to handle it gracefully. Doh! "* you are deep deep into the nested logic of the system. "Resource depletion needs to be handled at a _much_ higher level and at the peripheries of the system. "Shedding load once you are halfway through processing is always complex, processing intensive, error prone, and often down right defective. (You need to carefully back out of every resource acquisition, and reassemble every invariant on every possible error path or you have a resource leak or a defect.) "Hmm. Perhaps we should listen a bit more to the Environmentalists. After all, resource depletion is _never_ an unexpected condition...but once you are in it, you lack resources to handle it gracefully." Jobs! ----- Let me know if you're hiring firmware or embedded designers. No recruiters please, and I reserve the right to edit ads to fit the format and intents of this newsletter. Please keep it to 100 words. C&D Technologies is looking for two people: Engineering Technician: Support Embedded Software and Hardware Design of industrial Lithium-ion and Lead-Acid battery: management, control, and monitoring systems. Position located in Leola, PA (Lancaster County). Local candidates only. Responsibilities include: Test and verify a variety of embedded software and electronic designs for use in new industrial battery, monitoring, management, and control products. Opportunity to work through all phases of the Development Cycle, from Requirement Capture through Design, Implementation, Test and Deployment. Primary duty is new product test and verification, some product sustaining and customer support tasks are expected. Requirements: AS or BSEE/CE, Design, Plan, Execute, Document HW/SW Test, LabVIEW, Layout of PC Boards For more info see https://career.cdtechno.com/epostings/submit.cfm?fuseaction=app.jobinfo&jobid=216844&company_id=15966&version=1&source=ONLINE&JobOwner=969041&startflag=1 . C&D is also looking for an Embedded Software/Hardware Engineer who will: Design industrial Lithium-ion and Lead-Acid battery products: management, control, and monitoring systems. 90% of this role involves SW design, but experience with both HW & SW will be required. 4 person team. Must work with little direction in Leola, PA. (Lancaster County) No relocation will be offered. Work through all phases of the Development Cycle, from Requirement Capture through Design, Implementation, Test and Deployment - and a chance to contribute to the System Architecture. Experience: 3-5 yrs, C+, C++, BSEE, CAN BUS, Microprocessors, new product dev. Some product sustaining & customer support duties. Full spec on website: https://career.cdtechno.com/epostings/submit.cfm?fuseaction=app.jobinfo&jobid=216843&company_id=15966&version=1&source=ONLINE&JobOwner=969041&startflag=1) . Dolby Labs in San Francisco is looking for a couple of DSP Design Engineers. The qualified candidate will help develop new products or licensed technologies and be responsible for design, implementation, integration, testing and maintenance of audio algorithm as firmware on a variety of processor architectures. Full details are at http://careers.dolby.com/detail.asp?jobid=dolby1399 . Joke for the Week ----------------- NEWS BULLETIN: Saying it will improve the education of children who have grown up immersed in computer lingo, the school board in San Jose, Calif., has officially designated computer English, or "Geekonics," as a second language. "This entirely reconfigures our parameters," Milton "Floppy" Macintosh, chairman of Geekonics Unlimited, said after the school board became the first in the nation to recognize Geekonics. "No longer are we preformatted for failure," Macintosh said during a celebration that saw many Geekonics backers come dangerously close to smiling. "Today, we are rebooting, implementing a program to process the data we need to interface with all units of humanity." Controversial and widely misunderstood, the Geekonics movement was spawned in California's Silicon Valley, where many children have grown up in households headed by computer technicians, programmers, engineers and scientists who have lost the ability to speak plain English and have inadvertently passed on their high-tech vernacular to their children. While schools will not teach the language, increased teacher awareness of Geekonics, proponents say, will help children make the transition to standard English. Those students, in turn, could possibly help their parents learn to speak in a manner that would lead listeners to believe they have actual blood coursing through their veins. "Bit by bit, byte by byte, with the proper system development, with non-preemptive multitasking, I see no reason we can't download the data we need to modulate our oral output," Macintosh said. The designation of Geekonics as a language reflects a growing awareness of our nation's lingual diversity, experts say. Other groups pushing for their own languages and/or vernaculars to be declared official viewed the Geekonics vote as a step in the right direction. "This is just, like, OK, you know, the most totally kewl thing, like, ever," said Jennifer Heather Notat-Albright, chairwoman of the Committee for the Advancement of Valleyonics, headquartered in Southern California. "I mean, like, you know?" she added. They're happy in Dixie. "Yeee-hah," said Buford "Kudzu" Davis, president of the Dixionics Coalition. "Y'all gotta know I'm as happy as a tick on a sleeping bloodhound about this." Spokesmen for several subchapters of Dixionics -- including Alabonics, Tennesonics and Louisionics -- also said they approved of the decision. Bill Flack, public information officer for the Blue Ribbon Task Force on Bureaucratonics said that organization would not comment on the San Jose vote until it convened a summit meeting, studied the impact, assessed the feasibility, finalized a report and drafted a comprehensive action plan, which, once it clears the appropriate subcommittees and is voted on, will be made public to those who submit the proper information-request forms. Those involved in the lingual-diversity movement believe that only by enacting many different English languages, in addition to all the foreign ones practiced here, can we all end up happily speaking the same boring one, becoming a nation that is both unified in its diversity, and diversified in its unity. Others say that makes no sense at all. In any language. About The Embedded Muse ----------------------- The Embedded Muse is a newsletter sent via email by Jack Ganssle. Send complaints, comments, and contributions to me at jack@ganssle.com. The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster. We offer seminars at your site offering hard-hitting ideas - and action - you can take now to improve firmware quality and decrease development time. Contact us at info@ganssle.com for more information. From jwbruce at ece.msstate.edu Wed Oct 21 11:26:07 2009 From: jwbruce at ece.msstate.edu (J. W. Bruce) Date: Wed Oct 21 11:26:17 2009 Subject: [ece4723] Fwd: Fall Special from HEI In-Reply-To: <20091020232534.3BD76580849@zimbra.ece.msstate.edu> Message-ID: <7229693.346111256142367490.JavaMail.root@zimbra.ece.msstate.edu> FYI: I don't endorse this company or its products. I just thought that some of you may be interested and find the 15% discount useful. Cheers. jwb ------------------ J.W. Bruce, Ph.D., Associate Professor Department of Electrical and Computer Engineering Mississippi State University 406 Hardy Road, Simrall 335 Mississippi State, MS 39762-9571 Office: (662) 325-1530 FAX: (662) 325-2298 ----- Forwarded Message ----- From: "HEI Newsletter" To: jwbruce@ece.msstate.edu Sent: Tuesday, October 20, 2009 4:03:49 PM GMT -06:00 US/Canada Central Subject: Fall Special from HEI Howard Electronic Instruments, Inc., your desoldering specialists Monthly Newsletter October & November 2009 1-800-394-1984 (Local 316-321-2800) HEI Fall Customer Appreciation good until November 30th Oct - Nov, 2009 / issue # 61 Take 10% +5% off of all Products on the HEI Website at www.howardelectronics.com Order anything on the web site and on the basket page, type FALLSPECIAL in the Discount Code Box and you will receive a 10% discount. When checking out you will receive another 5% internet discount giving you an awesome 10% +5% savings . Click on Images to go directly to the Page JBC BD-1BA Lead-Free Soldering Station Steinel heat guns, hot air guns, glue guns and butane soldering irons JBC Family of tools for the electronics industry HEI Scope LCD Video Inspection Station JBC Tools AM6850SMD SMT Rework Station (The Best) SMD Rework Equipment JBC AM7000SMD Master Appliance Heat Guns and butane soldering irons Xytronic 852D High Power Lead Free Digital Hot Air station Xytronic LF2000 Lead-Free Soldering Station IR Rework, SMD Rework Xytronic LF8000 Lead-Free soldering, desoldering, hot air and hot tweezers rework station FREE DOWNLOADS ? JBC Tools Video Clips ? Goot RX802AS Video Clip ? All Video Clips ? Price Lists for all Tools ? Manuals for all Tools ? Articles of Interest ? Lead Free from HEI Copyright ? Howard Electronic Instruments, Inc. You have received this newsletter at this address jwbruce@ece.msstate.edu. You will be receiving more cost saving newsletters from us in the future. If you feel like this newsletter will not benefit you, but would like to forward it to someone else in your organization Click Here , or if you would prefer to be completely removed from our customer savings list click HERE to be removed from our mailing list. Howard Electronic Instruments, Inc. 974 SE Pioneer Rd. El Dorado KS 67042 From dlj165 at msstate.edu Wed Oct 28 18:38:14 2009 From: dlj165 at msstate.edu (David James) Date: Wed Oct 28 19:28:17 2009 Subject: [ece4723] Soldering Videos Message-ID: <001f01ca5827$b7d63c80$2782b580$@edu> PCB: Here are some URLs to a few through-hole soldering videos. I do not endorse any commercial products or support any opinions expressed in these videos. I merely thought that they largely had good video views of the soldering process. YOUR NEW BEST FRIEND * how to tin a new iron (new tip) http://www.youtube.com/watch?v=ZBiUjfUxXjU * solder iron maintenance http://www.youtube.com/watch?v=FCf4F5v080Q SOLDERING * lead free prep (xmas tree) I don't own one of these. I use my pliers like the next video shows. http://www.youtube.com/watch?v=EMv28K74KFc * lead free prep (pliers) http://www.youtube.com/watch?v=B2ZyIAm_i_k * good all round intro video http://www.youtube.com/watch?v=I_NU2ruzyc4 * lead free soldering http://www.youtube.com/watch?v=CGnt2vCAjfQ DESOLDERING * solderbraid and manual solder vacuum http://www.youtube.com/watch?v=j-_pnc-Qqm8 * how to use solderbraid and resolder http://www.youtube.com/watch?v=r___O5AejTE SOLDERING ATHLETES http://www.youtube.com/watch?v=-gFJ2QfQcb4 Surface Mount There is no better way to learn soldering than just get in there and burn your fingers. Soldering is a skill that you must practice. Here are a few videos from certified soldering instructors. Watch these videos a few times __BEFORE__ class on Monday. SMT resistor (iron and solder) http://www.youtube.com/watch?v=_IqJdJEMUOE SOT23 (diode?) http://www.youtube.com/watch?v=iQujMK_rju0 QFP (pt-to-pt) http://www.youtube.com/watch?v=NALwJ6OnwNw Removing soldering bridges http://www.youtube.com/watch?v=eg2hxpy--gg SOIC SMD (hoof-tip drag method) DO NOT TRY THIS UNTIL YOU HAVE LOTS OF SMT EXPERIENCE AND THE RIGHT EQUIPMENT!!!!! http://www.youtube.com/watch?v=wQXhny3R7lk SMDs and their PCBs are very-heat intolerant. Surface-mount PCBs have very small "pads". They are very easy to pull up if you heat them too much. SMDs are very small and you can easily melt their internals if you hold the iron to them for any period of time. Take your time; be patient. SMT boards are challenging. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.ece.msstate.edu/pipermail/ece4723/attachments/20091028/1c72a073/attachment-0001.html