Daniel Ribeiro (@Dilberto)
I have been using an analyzer like the one of the Amazon you showed for debugging I2C interfaces for at least 3 years, and it works nicely.It's straightforward to...
Hi, David! I can't say if it helps, but that's the code I used some 10+ years ago for the LP2388 UART initialization: https://drive.google.com/file/d/1O1ouRyZV6dimaLkok... ...
Hi Anoop22!You'll find a lot of good information on the ST site.They even have a type of framework called STSPIN related to motor control.Cheers!
Hi SpiderKenny! I agree with your advice! It's the same I give to everyone that asks me about this!Cheers!
Hi, faustoRaicam! I think the O. P. wanted to write spi_enable; It should be a type of "finger addressing error" :-)Daniel.
Hi, @Namcrazy37! Using STM32CubeIDE can do all the hardware configurations for you, and, better yet, it can flag hardware configuration errors and even auto-correct...
Hi!Some questions:Have you measured the power supply line quality of your wall charger? Besides the wall charger, is there another live power supply tied to the...
Hi, dnj!The method I depicted is somewhat different from the way long strings of individually programmed RGB LEDs work.IIRC, with individually programmable LED strings,...
HI, John! 1. There is another cheap micro on the block, although its architecture is somewhat old. It's the EFM8BB10 from Silicon Labs. Sure I rather ARM, but...
Addressing should be correct, otherwise, you'd not have ACKs, as seen in the analyzer plots.About the busy flag, I'd not use it for the first approach, because it...
Hi, Codeguru! If you plan to interface the microphone's output to an A/D input of the µC, why not get rid of the offset voltage in software? And, if the...
Hi, Elliott_Embedded !I don't use I2C for the display, but what works for me, in the LCD initialization, is :Delay 20 ms approximatelySet size to 8 bitsDelay 7...
Hi Max!Just completing the answer from @mrfirmware, it's worth to say that C's offsetof() macro is an ANSI C library feature found in stddef.h, that is, the offset...
I completely agree with you.It would be nice if every poster, independent of the aim of the question, ever provided some basic information about what he ( she...
Hi, Max!
What about to try the following:( I don't know if it works, but at least, it compiles! :-)
#define NUM_SET_BYTES 10union Settings{ ...
Hi, @Aditya_Ubarha!What I think @Steve_Wheller is trying to say to you is that LEFT JUSTIFIED works as a percentage ( in p. u. notation ) of the A/D's full-scale,...
Agree.But matching signed/unsigned variable types with array values may avoid some compiler warnings and improve program readability.About saving computer's instructions,...
HI, @hodgec!Agree with you, but in the case of using negative numbers, there is two ( perhaps more ) approaches, each one having a penalty:-1) If the variable that...
Hi, @Aditya_Ubarha!The other use for left alignment is whether you'll have to scale ( = multiply ) the A/D's result in order to do some math to obtain a meaningful...
Hi, MaxMaxfield!I guess the '--' operator is intended to be used in very simple operations and this is not the case.The compiler complaints that 'Fred++' is not...
Hi, tcfkat!You should enter the Obfuscated C Code Contest (https://www.ioccc.org/).You have a really good chance to win!:-)
HI, steven02!The last method you quoted is used by industrial PLCs ( Programmable Logic Controllers ).Seems the best to me.Cheers!
Hi 'K'live ( kkk )It's very funny to read from you! :-) Matt's idea is very good but, as you say, there is always more than one way to do things.Another ideas...
Hi, MaxMaxfield !When I saw the subject of the thread, I thought, can only be MaxMaxfield! :-)Many years have passed since I have used Karnaugh Maps for the...
An outdated joke:The paradise: English house, American wage, Japanese wife, Chinese food.The hell: English wife, American food, Japanese house, Chinese wage.:-)
Hi, Max Maxfield!I've read your column in Hackaday.io and I really appreciated the precision description of the French cuisine! :-)Also, I didn't know the Renard's...
I don't remember the ratios, but I think the majority of parts fell off in the 1% bin.This, alongside with the testing method ( see below ) made the reclassification...
Hi, jms_nh!I've read the excerpt from the article "Tolerance Analysis" that you attached in your answer to CustomSarge.Well, first of all, things used to happen...
Hi, MaxMaxfield!If the switch has two poles, one NC and one NO, an RS FlipFlop ( 2 cross-coupled NOR gates ) will do the job.Otherwise, there is a myriad of methods...
HI, MaxMaxfield!Glad to read from you again! I always learn something new with your questions!I worked in an electronics components manufacturing facility in the...
Hi, blaze_embed_94!This is not aimed to help, but I couldn't resist the temptation to say that, in the eighties ( yes, I'm old ), British magazine Elektor Electronics...
Hi, MaxMaxField!Glad to read from you again!Your doubts are not only the doubts of many of us as they also end revealing much useful information ( see below ).I...
Hi, rp346!I'm not sure if I've understood what you mean.Would you like to develop software for your STM8 board using Arduino IDE or to build a STM8 programmer to...
Hi Imitcham!Thank you for answering.I agree with you. With caveats."The most important tool in an engineer's toolbox is his brain"Some quotes that corroborate this...
Hi, jeghartman!Thank you for answering.I partially agree with you.No, this is not a question with a very simple answer. See others' comments.But, depending on the...
Hi, gillhern321!Thanks for answering!"I Don't want my son flying that thing." :-)About the quality of software, I think if the automobile industry uses a tight...
Hi, MatthewEshleman.Thank you for answering.I got your point. As the rate of bugs per line of code is constant and relatively independent of the language, a program...
Hi, matthewbarr!Thanks for answering.Agree with you. Much you've placed here are the "other factors that could impact the metrics", as I have said in the answer...
Hi, Bob11!Fantastic example!When I began using ARM, specifically ARM-7 a bit more than 10 years ago and Cortex M0/M3 soon after, I was already a high-level language...
Hi, CustomSarge!First of all, thank you for answering.I think that modularization can be achieved in assembly language as well as at a higher-level one. As you said,...
Hi, vbhunt.Thank you for replying.I, as an Embedded Engineer, dream all days with coherent, complete, and clear specs, but my experience says it's utopia!Some related...
Hi, cprovidenti!I must confess I've used this trick many years ago, but it has 20+ years that I don't write a line in assembly language, mostly due to the lucky...
Thank you for your reply, dnj.Your experience as an assembly language programmer is very enlightening.We all know that one of the strongest points of high-level...
Hi people!Inspired by a recent thread started by @MaxMaxfield ( https://www.embeddedrelated.com/thread/11327/is-char-signed-unsigned-and-is-on-signed-defined?pw=Amxh9...
Hi, @CustomSarge!Not absolutely related to the question asked by @MaxMaxfield, but I thought it was worthwhile to comment on your post.I agree with you on many things...
... Or maybe it's not the point of the question and it's not worthwhile to lose time with it. :-)Cheers!
Donald Knuth, the author of The Art of Computer Programming, said:“People who are more than casually interested in computers should have at least some idea of...
I agree with @beningjw and @sdbranam.I must confess I didn't know Miro Samek's FSM ( thanks @sdbranam, I'll give it a try ).Basic use of FSMs written by your own...
Hi Ömer!In my case I work with very small products, basically, Cortex M0, M0+, or M3, ranging from 8K to 128k of program memory, few analog stuff, and simple communication...
The advice to buy a Nucleo Development board is just perfect.Cheap, affordable, ready-made hardware and with a lot of documentation, libraries, examples and other...
Agree with you and beningjw.When I decide to do penance, I pick an 8-bitter to play with. And it's an MCS51 !!!And, for those to say that 51 devices are around for...
Hi, @ridgerunnersjw !I use the online C compiler ( https://www.onlinegdb.com/online_c_compiler ) to test a C code snippet when I'm not sure how it behaves.It's very...
Me too. And I forgot to mention the code is also very inefficient, because every time the loop executes, the number of shifts increases, instead of doing just one,...
In reality, the data variable doesn't need to change, because the shift is data>>iand not data>>1I dislike this type of construction,...
I guess you're using some flavor of STM32 µController and Atollic Studio or STM32CubeIDE and a GCC C or C++ compiler. Maybe I'm completely wrong, however.As advice...
I don't think so. The 'shift' is inside the if clause and is not been assigned to the 'data' variable.
Hi, kingca! What µController are you using? What IDE are you using? What tools ( compiler, etc. ) are you using?Are your system working and just this function...
"The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry."...
Hi, Hopworks!If you are concerned about "bringing moist outside air into the thing to cool it", what about to install an outside humidity sensor and bring outside...
Hi Stormy_dll!The GPS you're using has a high-quality Ublox module, but have you considered to replace the module?Even a high-quality part may have performance issues and,...
hi, Stormy_dll!IMHO, this type of problem may be associated with power supply issues.Have you measured the current consumption with and without sensors attached?Have...
I'm used to doing UART x RS485 with Maxim chips ( MAX1487CSA+ ), they have high protection against electrostatic discharge ( 15kV ), are short circuit protected...
Hi, Tim!I've not the answer, but I have doubts to contribute :-)Is your project 'deeply embedded' when ...... You have to design the PCB?... There is at most 2 people...
Hi, Skorartyl!If you have played with PIC micro, probably you've done it in assembly language, right?Well, IMHO it's time to change to a high level language.Nowadays,...
quote : "I was expecting 1Eh, but instead I got 9Eh."I didn't check your code but, by the above statement, I'd check the configuration of the serial port, especially...
Did you make the static test with the new micro, the AT89LP52?Once it works with the old one in 'cruise speed', it isn't worthwhile to do a static test with this...
Hi!Can you try a static approach, just to be sure the problem is/isn't speed?By static approach I mean driving the clock of the shift register in a pace manually...
Hi!If you have proven sample code from the manufacturer of the chip, give it a try.You'll benefit from :- Certify your hardware- Compare initialization and overall...
Use this form to contact Dilberto
Before you can contact a member of the *Related Sites:
- You must be logged in (register here)
- You must confirm you email address