• Content count

  • Joined

  • Last visited

  • Days Won


enl last won the day on March 12

enl had the most liked content!

About enl

  • Rank
    Level 2

Profile Information

  • Gender
    Not Telling
  • Location
  • Interests
    Machining, welding, electronics, woodwork, making, education, tools, toys

Recent Profile Visitors

120 profile views
  1. Am I reading correctly that this is with the LM35 not connected to the input pin? In other words, there is nothing connected to the input pin? If this is the case, then the potential on the pin will float, generally to about half of the power supply, give or take (depends on the device) and, being configured as an input, it will have very high impedance, so it will pick up noise. You would be measuring more the properties of the multimeter and its interaction with the floating input than a real potential.
  2. Most of his talk was not about C++, but about how to social engineer others into adopting in a non-supportive environment. It was a religious rather than technical exposition, as many Java talks, for example, also are. As to the data, I buy it. The technical points made are that strong typing reduces run time bugs is true, under the umbrella that only certain flavours of bug are caught, but these flavours lead indirectly to bugs of kinds not caught directly. Another advantage of strong typing is that, properly used, it can let the compiler do better optimization. His test case, a lightweight class, is probably where the advantages are greatest, but this is where, for many embedded applications, the other benefits to C++ are most available. I am not convinced that many of the 'more advanced' C++ tools and abstractions will give the same benefits, other than, with proper design, reduced debugging.With improper design (as one of the questioners put it, 'naive') there are likely to be losses. Some tools impose run time penalties that are unavoidable (often space rather than time) even with strong typing, but many of the standard tools (vector, for example) minimize this hit and save enough in other ways to be a net gain. Well designed standard tools pretty much always beat implementation specific, since they are designed (usually) by a specialist whose sole point is to get the best performance (by some metric) on the specific hardware. C++ provides a LOT of these tools. There are cases where a special purpose tool is better, but these are often brittle when changes are required, and the next revision has a net loss, either in performance (time or space) or in increased debugging. For reference, I tend to be a 'well written C is valid C++' kind of programmer, and use the C++ tools sparingly, especially in embedded work, and am NOT a C++ guru. I am, in fact, quite out of date with regards to the state of the C++ art. I still use the tools as they are appropriate, though. As for the social engineering aspects of the talk, nothing new. Read Dale Carnagie for the same. It is an effective model for understanding others and working with them. Nothing that hasn't been in writing for a good century, and known much longer, though in this case there is the extra fancy four quadrant graph of belief presentation.
  3. Ah. I went through the log and saw that I had added the site as an exception on one machine (one I generally use for such) in 2015. Tried accessing from the shop machine today. I am surprised I haven't noticed before, but, then again, the shop machine has all of three bookmarks in the browser, since it is generally used only for the shop gear.
  4. It appears that 43oh is rejecting https connections (browser: mozilla, system windoze8, urls tested: https://www.43oh.com/ https://forum.43oh.com/ )
  5. I presently both practice and teach, so, in reference only to the engineering side, which is maybe 30% of my professional life these days: How many engineering positions have you had? *4 or so in the last 30 years. Current engineering position has been about 10 years, and is a different field than my degree (mechanical eng/welding is the core scope, but my degree is semiconductor fab/computer eng. I cover a wider base than that, mostly by being liaison between the company and clients or inspectors) I haven't actually worked primarily in my nominal field since the late 1980's. Do you enjoy writing? *to a point What tasks do you do that involve writing in your job position? *Job bids/proposals; RFI/RFQ (request for info/request for quote); evaluations; training materials; compliance materials (safety program, statements of compliance, etc); professional opinion documents; requirements documents; interpretations (code and standards, regulations); documantation/logs for jobs; Do you use the writing formats/styles that you learned in school? *Sometimes. Much of what I do is specialized, though not as specialized as the 2-page-long paragraphs found in military specifications and RFQ's, and much is dealing with non-engineer-tpe, often non-native english speakers (spanish, norwegian, japanese, german, korean, etc), so the formal styles that were focused on when I was in school don't match well. THings have likely changed, though, so the current teaching practice ma be a better match. How often do you encounter a disorganized email and/or document? *Daily. Hourly. Does reading an un-formatted/disorganized document take time away from other job tasks? *Yes Have you ever had to second guess what a person meant when you read their writing? *yes. Daily. Hourly. Did you ever have to ask a person what they meant? *yes Do you proofread your writing? *Yes. I prefer someone else do so, as well. You need to be your own first critic in ANYTHING you do (writing, circuit design, welding, mechanical design, or anything else), but it is easy to be drawn in to what you think you have written. A fresh look helps, especially when it is someone who is not as familiar with the topic as you are. Have writing styles changed in the engineering field since you have started? *Yup. Computers have made a big difference, as has the default software (MSword). Hand written math and symbols died not long after I got out of school, expectation of good formatting of text came in at about the same time. For a time, math was either very well formatted (professional tools were used), or was crap (MSword/macwrite). Now, there is a general mediocrity, but most of the time, things can be interpreted. The indented paragraph has given way to the double line-break. The parenthesized clause has become acceptable (and I have accepted it). Spelling is much better with spell check, though odd errors are more common. In the last several years, I have been seeing more textspeak in non-casual documents (for example: "the site crew will return at a l8er date, no less than 30 days and no more than 45 days after work acceptance, to re-pressure test all welds and mechanical joints".) I have also seen a lot more of the use of verbal crutch sounds in written documents (an RFQ starting "So the scope of work shall be"... with no antecedent)
  6. The board sockets on to the power header The 5-pin with the cable going to the right is for a button and double pole, center off momentary switch for adjusting the scale in operation. The software does linear interpolation from 0 to 100 degrees F, and allows for key points every 10 degrees. The three yellow wires go to the remote sensor (DS18B20). The mounting is leftover oak from redoing a floor. Glued up, planed, bored for the meter and the electronics, and finished to hang on the wall. The circuit board is mounted by putting epoxy in the pocket and dropping it in. Power board on. The tie point for the power line isn't on yet. The face of the finished display: The finish is shellac. I slopped on a heavy coat, light sanded, and then wiped another couple on. Then paste wax. Not perfect, but I banged it out quickly. The meter: Operating. The temp in my shop has climbed to 66F with a lot of help from the electric radiator.
  7. I spent some time last year setting up an analog meter driver/thermometer for a client, and at the time, I went through my stock of junk^H^H^H^Hreclaimed parts and found a phase angle meter with degree graduations on it. I said to myself "since I alredy wrote the code and did the dev work on someone elses dime, I should throw one together for myself". A year and a half later, the holidays hit and I was looking for something to do instead of paperwork for work. So, I layed out a single sided board (the original was on a launchpad), cut it on the mill, and populated it. There was a couple days in the middle between cutting and populating (the holiday, you know), so I had a surprise. The astute amongst you might notice something missing on this layout, given that this is a low power project that will require stable voltage for the analog meter. Yup. No regulator pads.Finished soldering up the board and sitting there in the tray is the regulator. Whoops. I didn't feel like going whole hog (including changing a setup on the mill) for a board just to hold the regulator and a couple caps, so I pulled out a sharpie, a scribe, and an ancient bottle of ferric chloride. 20 minutes later, I had an etched board that would do the job. Ugly, but functional. The layout for the main board will be revised in case I reuse it. It doesn't look so bad populated. The wire is for USB power.
  8. Presuming you are talking about a processor with no support in hardware for division or multiplication: In the absence of hardware support, the fastest is bitwise calculation akin to long division. The cycle is basicly subtract then replace if less, followed by shifts. The structure is similar to long division, and is about the same number of cycles as a single division. This is one-cycle-per-bit in hardware, but a bit more work in software. Figure two shifts, a mask, and a subtraction, and either another mask or unsubracting, plus loop overhead. You may need a 32 (or 24) bit accumulator for the residuals to catch borrows from the LSb. The FASTEST CONVERGING practical method is the Babylonian (divide and average; Newton's method), but that requires division, so is likely to be slower in practice for a 16 bit int, even with hardware division (though it may be close) If exact value isn't needed, or the range is restricted, other methods can be faster, such as a lookup table, but for a 16bit value, the extra code and lookup table overhead are more likely to slow things down. A bit more detail (what processor, what language, how accurate, etc) can narrow it down. This is a case where the wikipedia page isn't bad: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots
  9. Welcome to the preprocessor. I don't know of any more elegant solution as parameters are literal, though there may be one. The second level forces the parameter to be seen as a token itself and be substituted. The initial version did not let the token be seen on its own. I learned the power, and limitations, or macro expansion with asmh on MVS, writing a 12 liner to expand to the twelve days of xmas for a class. The C/C++ preprocessor is more capable, but is still not doing full featured regeps.
  10. I tend to use this style for many things, in particular single thread embedded applications like one tends to have on the smaller MSP430's, but it isn't always my preference. The code tends to be more readable if done reasonably well, with full optimization available since it is expanded by the preprocessor, but inline functions can be just as efficient and are often less likely to lead to debugging issues, making them generally preferable when available, but with the drawback that expansion is not mandatory, so timing is not guaranteed. If forced, you lose some space optimization features.
  11. @yyrkoon They are not cheap, but keep in mind that they developed the software, and, unlike some of the clones (by the magic of google) actually perform as advertised I may be biased, having spent several thousand dollars for significantly less performance during the present millennium for a dedicated device, but I see it as a real deal. With the USB units, buffering is a concern, but none of them (as far as I can tell) are over endowed with memory. They need a USB channel that can suck up data and a host that can do something with it. I have had no issues at 500MHz with a saleae pro on a netbook, but I am not streaming netflix when I am using it. You are looking at low speed UART work, and I would bet a ZX81, or bottom end saleae clone, would be capable of dealing with it. If you are in a time pinch, at those speeds, an MSP430G can split the bits and ram them up the USB line from a launchpad. A 13$ msp432 can do a lot better than that. Given what you are looking at, you are likely to need to write your own protocol analyzer, or see if one is available for a standard device. The Saleae has the advantage of a reasonable dev environment for rolling your own protocol analyzer. The only things showing up in a quick google search that do DALI are pretty far up in price and are locked up against building your own. If it were me, and a deadline was up, I'd call saleae and grab the logic-4 or logic-8 on fast shipping. If $100 is a killer, then you already blew too much time on the project.
  12. I have and use a Saleae logic-8, and have a logic-8pro at work. The lowest end is logic-4 at about $110. For what you are looking at (sub-100KHz) the logic-4 would do well as the sample rate is 12MHz. The logic-8 is 100MHz sample, which is reasonable to about 10MHz systems. There software has several protocol analyzers (I2C, SPI, RS232/standard serial, USB, and about 20 others) and I think it is possible to write your own. I have nothing but good things to say about the unit, and would only give the standard cautions that the units are most useful on a laptop running on battery power to avoid ground issues. A number of the far east import units are near clones, but I can not speak for the quality of them. (one I was looking at had a link to Saleae for the software. I thought that was a bit.... scummy) The reason I went for this is that the reviews were good, the sample rate was sufficient for most of what I need, low V to 5V logic compatible, protocol decoders for things I need are not extra cost, and the software is a good match for what I have used in standalone units for many common features. You can pull the software and play with it without the unit. If there is no unit on the computer, the software fakes it for you for demo. Learning curve is good enough that I have had students using it to debug I2C and SPI in less than 15 minutes. Not experienced students, but first time with anything more involved than blink an LED level students. Edit: watched the video you linked. Looks like a Saleae clone. I don't like the plastic case (shielding issues), but at sub-mhz it is likely not a problem. I haven't used the software he uses. I have a windows machine for such things (due to Autodesk, oscilloscope remote UI, and the microscope cameras), so it isn't a hassle.
  13. What orientation do you have for a project? The capabilities of the processors differ so much that it is difficult to answer your question without knowing where you are going. No sarcasm is intended in the following suggestions: Robotics? You can do multiaxis control in real time. Audio? You can do signal processing within the limits of the ADC resolution. Video? I would guess that you could produce VGA output to run 640X480 VGA at 8 color (one bit per color), or possibly better with some careful programming, and have no major issue producing a videogame. Certainly 320X240 should be straightforward. Using R-2R chains, you could easily produce interesting video output, though anything requiring a frame buffer would likely be out due to RAM limitations. It would probably not be too hard to produce NTSC in the same vein as an Apple II. The gains you get with the 432 include speed, memory, and processing per cycle. With a 430, serious audio isn't really practical. Real video is superstar territory. With the 432, both are straightforward, though not necessarily trivial. Specific ideas in audio: A guitar multi effect, maybe distortion, Wah (a pot on an ADC for bandsweep), flange, and reverb. All are moderately straightforward, but explore different algorithms. Video: One of the coolest thins I saw at a trade show in the late 70's was a video dazzler. Just cool patterns, but really, really cool. An audio input to control an arithmetically produced pattern as VGA output? Robotics: An 8 channel, I2C command servo controller? Do you ride? One of the things I did years ago with a PIC was an electronic ignition for a 1975 Honda CB400F (4 cylinder). Maxed out at about 12000RPM. The unit was tight to about 8000, but had a bit of jitter above that. Drove an output for the tach as well. The 432 can cover other things at the same time, and not lose it's place for the ignition timing. Got a cat? Using the ADC and DSP capability, an ultimate class cat toy? Detect appropriate stimulus (Meow, scratching, othe r) using a microphone, and do something interesting, like turn on a laser pointer mounted on servo's to entertain the cat, and when it gets to a certain point, release a treat? Ok... my mind runneth over. Several of these are things I don't have the time to do. There are many, many more. All of these take more than the 430 can reasonably do (except ignition timing), but none fully explore the capability of the 432.
  14. I suspected this as result of placing an order and getting free shipping. Nice to have it confirmed. The free license for full CCS with the launchpad is also still active, though the checkout added a number of other things for no reason (25 pack of launchpads, full CCS for full cost, and a couple other things), but they were deletable.
  15. Starting point is you have an off by one eror on the loop counter: the test should be "<5", not "<6" as you are trying to do it. But, I think the main issue is that A0, A1, etc are aliases for pin identities, not channel values. You might try: const int analogpins[]={A0, A1, A2, A3, A4}; . . . . for (int i=0; i<5; i++) { sensorValue=analogRead(analogpins[i]); . . .