EmbeddedRelated.com

Daniel Ribeiro (@Dilberto)

Electronic Engineer, Industrial automation systems, Embedded software developer

Re: Writing to registers of IQS620A sensor.

Reply posted 4 months ago (06/06/2024)
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... ...

Re: how to start work on bldc motor control

Reply posted 1 year ago (07/24/2023)
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!
"... and hate quizzes.":-)
Multimeter and scope are primary tools.Next level must include a logic analyzer.

Re: DIGI RABBIT 2000

Reply posted 2 years ago (08/18/2022)
Hi SpiderKenny!   I agree with your advice! It's the same I give to everyone that asks me about this!Cheers!

Re: Question re Servos

Reply posted 2 years ago (06/20/2022)
Hi, Max!Welcome to the Arduino world!      :-)Dilberto.
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...

Re: Connecting USB generates voltage spikes in circuit.

Reply posted 3 years ago (03/22/2022)
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...

Re: How to build a network of tiny micros?

Reply posted 3 years ago (02/08/2022)
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,...

Re: How to build a network of tiny micros?

Reply posted 3 years ago (02/07/2022)
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...
A silly question:Is the LCD contrast adjust ok?

Re: Interface mems microphone to microcontroller

Reply posted 3 years ago (12/03/2021)
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...

Re: Determining the index of a value in a struct

Reply posted 3 years ago (08/05/2021)
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...

Re: HardFault during erasing Flash in debug mode

Reply posted 3 years ago (07/09/2021)
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,...

Re: Another Noddy Question

Reply posted 3 years ago (06/09/2021)
Agree.But matching signed/unsigned variable types with array values may avoid some compiler warnings and improve program readability.About saving computer's instructions,...

Re: Another Noddy Question

Reply posted 3 years ago (06/08/2021)
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...

Re: Questions re Coding Efficiency

Reply posted 4 years ago (03/30/2021)
"That's my philosophy also"

Re: Questions re Coding Efficiency

Reply posted 4 years ago (03/30/2021)
Me too!     :-)

Re: Communication protocol suggestions

Reply posted 4 years ago (03/23/2021)
Have you considered AS-Interface ( https://en.wikipedia.org/wiki/AS-Interface )?
Thanks for the explanation!
"If you are fired you should quickly change all code to this"Interesting idea!!!:-)
Other thinking:'Fred++' is an operation, hence, not an lvalue, even after executed.
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!:-)

Re: Software driver SPI I/O expander

Reply posted 4 years ago (11/29/2020)
HI,  steven02!The last method you quoted is used by industrial PLCs ( Programmable Logic Controllers ).Seems the best to me.Cheers!

Re: But Where Should the LEDs Go?

Reply posted 4 years ago (11/26/2020)
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...

Re: Karnaugh Map Minimizations

Reply posted 4 years ago (11/24/2020)
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...

Re: So, You Want to be an Engineering Manager?

Reply posted 4 years ago (10/03/2020)
Hi, Max Maxfield!I would advise reading Dilbert's comic strips to know what absolutely NOT to do!

Re: Answer Regarding Resistor Tolerances

Reply posted 4 years ago (09/26/2020)
An outdated joke:The paradise: English house, American wage, Japanese wife, Chinese food.The hell: English wife, American food, Japanese house, Chinese wage.:-)

Re: Answer Regarding Resistor Tolerances

Reply posted 4 years ago (09/24/2020)
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...

Re: Question regarding esistor tolerances

Reply posted 4 years ago (09/21/2020)
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...

Re: Question regarding esistor tolerances

Reply posted 4 years ago (09/20/2020)
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...

Re: Question regarding esistor tolerances

Reply posted 4 years ago (09/19/2020)
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...

Re: RF integrating with pic

Reply posted 4 years ago (09/07/2020)
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...

Re: To Cast, or Not to Cast

Reply posted 4 years ago (06/26/2020)
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...

Re: Interface to program STM8 ?

Reply posted 4 years ago (06/15/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
Hi, SpiderKenny!Thank you for answering.:-)   :-)   :-)   :-)   :-)   :-)   :-)   :-)   :-)   

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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,...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Re: Software Bugs

Reply posted 4 years ago (05/30/2020)
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...

Software Bugs

New thread started 4 years ago
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...

Re: A physical test emulator for embedded systems.

Reply posted 4 years ago (04/23/2020)
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...

Re: STM MCU for GPS Tracker

Reply posted 4 years ago (04/21/2020)
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...

Re: STM MCU for GPS Tracker

Reply posted 4 years ago (04/21/2020)
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...

Re: STM MCU for GPS Tracker

Reply posted 4 years ago (04/21/2020)
If these are the 'pros' for the 32-bit processors, I don't want to see the 'cons':-)

Re: strcmp help please

Reply posted 4 years ago (04/08/2020)
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...

Re: Expect Downtime

Reply posted 5 years ago (01/19/2020)
:-)

Re: How to get a signal from 74595

Reply posted 5 years ago (01/12/2020)
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,...

Re: How to get a signal from 74595

Reply posted 5 years ago (01/12/2020)
In reality, the data variable doesn't need to change, because the shift is         data>>iand not         data>>1I dislike this type of construction,...

Re: How to get a signal from 74595

Reply posted 5 years ago (01/11/2020)
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...

Re: How to get a signal from 74595

Reply posted 5 years ago (01/11/2020)
I don't think so. The 'shift' is inside the if clause and is not been assigned to the 'data' variable.

Re: How to get a signal from 74595

Reply posted 5 years ago (01/11/2020)
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...

Re: Software expands to fill the memory available

Reply posted 5 years ago (11/14/2019)
"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."...

Re: Outdoor LED Decorative Project Question

Reply posted 5 years ago (11/09/2019)
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...

Re: GPS(GNSS)

Reply posted 5 years ago (11/01/2019)
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,...

Re: GPS(GNSS)

Reply posted 5 years ago (10/31/2019)
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...

Re: Industrial RS485 converters

Reply posted 5 years ago (10/06/2019)
I'm used to doing UART x RS485 with Maxim chips ( MAX1487CSA+ ), they have high protection  against electrostatic discharge ( 15kV ), are short circuit protected...

Re: What do *you* call "Deeply Embedded"

Reply posted 5 years ago (06/20/2019)
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...

Re: Choice of microcontroller for a project

Reply posted 5 years ago (05/11/2019)
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,...

Re: extended memory move operations in 8051

Reply posted 6 years ago (03/25/2019)
And I add : Why are you using assembly language?

Re: Detecting valid signals across multiple lines

Reply posted 6 years ago (01/26/2019)
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...

Re: CAN interfacing with lpc2148 via spi

Reply posted 6 years ago (10/21/2018)
Hi, pavan123!As stated by mr_bandit, "... read both datasheets - the CAN controller and the micro" to get used with both chips. And follow his other advices.Also,...

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