bandit gangwere (@mr_bandit)
I love bare metal systems, but I do use RTOSs if I need for various somewhat complex drivers and applications.Having said that, I did a bare metal system to read...
I am an Arduino Atmel AVR Freak. You can get an Arduino mini PRO that does what you want for $4 eachhttps://smile.amazon.com/gp/product/B015MGHLNA/ref...The toolset...
So you are using the Adafruit neopixels or equivalent.His board is logically how I imagined how to do it physically. I like his ping pong ball hot glue frame.I would...
My other thought is something that lets you select a ball && something happens. Like a mouse out of the adafruit 6dof. select both the location and color...
beningjw: "If the failure could cause death or injury". I would add if failure would cost a huge amount of money.Spot on. This is critical in avionics DO-178C projects.I...
My grandma was like your mom (gosh you are *way* older than me :^)When someone started on about how it was better way back when, she would do a smackdown, pointing...
I do mission-critical systems and heavily use asserts. In my experience, 70..80% (a guess, but roughly speaking) are from data structures not being setup properly,...
I have been a "sole-prop" guy too. No worries.Version control has saved my ass on many occasions.Sorry about you git fire. I tend to create scripts so I don't do...
(1) - do you have an oscope? If not, get one. The Rigol DS1054Z is $350. 4 channel, 50MHz. (I will not tell you there is a tool on the net that changes 1 byte of...
@CustomSarge: we have about the same amount of experience - I've been programing for close on 45 years, and embedded for at least 35 years. So - long enough to become...
I love your British humour! It would be great as a stage play - a nerd's "Hamilton" !! (I am hoping for a redneck version of Shakespeare: "Romeo, Romeo, Where in...
My father (at one point on of the top OS designers in the world) taught my programming - in assembly. My first real code was 8080 asm.the technique he taught me...
I saw a posting about:long long ago; // in a galaxy far far awayNote: every modern C compiler supports long long. Question 1: The C standard specified the signed-ness...
I realize I am coming late to the discussion. One trick I use in writing drivers is use an Arduino on the other end. It is easy to write a little "sketch" that...
Since you did not include the calling function, hard to see if MemorySelect is set to something other than 0.Have you put in slime printf's to see if MemorySelect...
You were probably using -O1 or -O2 flag.C compilers can be notorious for optimizing away code it thinks is not needed. I think Jack Ganssle has a post on thisTry...
For this small of a micro, personally I would just do a command loop with interrupt-driven devices. I don't know the "frameworks" the other posters have suggested.It...
C will still be the primary language. There really is no other language for the task. The size of logic is pretty close to the limit of physics (Moores Law has...
A good way to find issues like this is write the simplest program you can have that (in this case) will just read the values and print them out. Basically, isolate...
What they said.Fundamentally, if you don't need hardware breakpoints, a bootloader gives you simplicity. All you need is some sort of (generally serial) communication...
Found this blog entry: https://www.embeddedrelated.com/showarticle/943.phpPID Without a PhDTim Wescott●April 26, 2016●11 comments(and given 19 beers !!)
Yep - I did. I was in good shape when younger :^)I have a couple of things I have already written. Let me ponder what would make a good reasonable sized blogs.Thanks!...
Was there an "upgrade"? The "top contributors" list was reset && there appeared to be a color change.20 Nov 19, about noon CST... banditweird - everything...
I would add SW should always be under source control.Production should also have automated tests, that are a result of the development process.Basically, your list...
You can run the arduino.cc tool and point it to the .hex file Studio 7 produces. There is a single button to do the download.You need to setup the Arduino IDE to...
I assume this is what you have: https://www.pololu.com/product/1300"The USB AVR programmer doubles as a USB-to-serial adapter. The programmer installs as two virtual...
Assembly vs C: Modern C compilers are pretty good at optimization && can generate asm code that is roughly what hand-crafted asm can do. There are places...
You can have a fan inside the Al box that flows over the heatsinks.Get a $30 digital temp/humidity and put the sensor in the power box. Put the whole thing on the...
Yep - one of those problems creating forehead-shaped holes that have a simple solution. The Deamon Murphy has a 3-day attention span.Thasnks for letting us know...
i would call keil - it's their toolchain.This also has the flavor of something "minor" is missing - the solution is missing but "minor", in the sense when you find...
quote: If you are not using scatter-loading, use the --first and --last linker command-line options to place input sections.So - are you using the --first options?...
Not having the tools..I would look at the command-line options for all of the tools, esp the ones that generates the .sct files.Have you tried editing a .sct file...
Create a *very* simple project. For example, have each core toggle a pin that you would put an LED on (the embedded "hello world").I suspect (have zero direct cubeMX...
Create an I2C cable with the 6 sensors && make it as short as you can - under a foot would be good. You could put all sensors on a protoboard with a short...
ALWAYS have a oscope probe on the power line. A good way to find these kinds of problems. Also weird reset cases.Do NOT use a normal meter - they integrate &&...
Subversion will work - it can handle text and binary. I like the Windows Explorer add-on for ease of use.You should have ONE person as the Footprint Release Ghod...
You can get mini-pro's on amazon for a low price. I am kind of surprised nobody has specifically mentioned Zigbee or other mesh RF solutions. (Others mentioned...
Take a look at https://www.tequipment.net/Rigol/DS1054Z/Digital-Oscilloscopes/?v=0$350 for a 4 channel 50 MHz oscope. I cannot mention there is a tool on the net...
Make a foam sword (a boffer) from a pool noodle, duct tape, and a dowel or pvc pipe.Next time you do a project, smite the HW guys about the head to "remind" them...
I predict it took you 3 days to find this. (the rest of the time you were killing other alligators in the swamp.)I have forehead shaped holes in walls all around...
The easiest way is to hook up an oscope to the IR LED and capture the waveform. TV remotes use a NRTZ (NRZ) (non-return-to-zero) protocol. Even TV remotes do not...
look at the data pin itself. - are you really sure aboutThe primary question is why is bit 2 logic 0 on the I2C bus when it's pulled up to 3.3V ?the chip is probably...
You could get a Rabbit board (same model & clock) and run your code on it. You could also get an eval board with the same FPGA and use it for the experiments.You...
Seems like you are not sure of which side is causing the issue.First, I would suggest bit-banging the SPI at a low rate. This will tell you if the FPGA has a basic...
What does it read before the write, and why/what are you trying to do?This sets the databus size and speed. What do you need instead of the default?
1. Creating tools that improve over time. I have a CLI (actually, several) that I use as needed for both development tools (to understand hardware && write...
If you had a 50% failure rate for 4 boards, y'all need to find a better board house - just say'n....We are here to help...
Are all boards eval boards, or are you developing the boards?One of the things I love is bringing up new boards. I get to look at the EE and say "It's your problem"...
first issue - no clock. Cannot have a start bit without a clock.External resistors are required for inputs (on P Port) that may float. Also, internal pull-up or...
You imply you are able to reburn one or two bytes, or you re-write an entire block that includes the new CRC.Are you able to store the entire image in RAM, calculate...
Silly question: Is the ADDR pin connected to VCC or GND or floating?0x42 means ADDR is connected to VCC. See https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdf...
The first thing I see is you are configuring pins B0, not C0.Suggestion: write a little program that jut configures each pin you want to use as outputs, then a loop...
Channel 4 also produces a correct output PWM, but it doesn't have a complementary pin.You can get a fast inverter and make the complementary signal. The faster the...
Cool!The Deamon Murphy has dictated we will have a problem that takes 3 days to solve, and they all boil down to a switch,or a line in a config file, or a checkbox....
datasheet: Upon power-up or at power-down, the W25N01GV will maintain a reset condition while VCC is below the
threshold value of VWI, (See Power-up Timing and...
Looking at the data sheet:Write Protect (/WP)
The Write Protect (/WP) pin can be used to prevent the Status Register from being written. Used in
conjunction with...
Can you tell us more about the app?Just reading the data at speed, even in burst mode, doesn't do a lot of good if you cannot cook the raw data in time for the next...
Not unheard of that the first i/o takes a bit longer because of setup. But it seems you have solved the basic problem.It also may be that the only way to determine...
Look carefully at the definition of the SPIRBF bit. I have seen cases where a status bit's definition is deceptively defined && it doesn't work the way you...
I am curious why you cannot talk to the motor vendor.It sounds like you have been doing your homework. Can I assume this includes googling the motor number/ID? Failing...
A trick is to find an unused pin and wiggle it.Can you get a board by itself? You imply this is something y'all make. How are you able to make changes to the firmware?Microchip...
Kocsonya has a good point about the busy bit. You might put something in the loop (pseudo code):while ( SPI2STATbits.SPIRBF ) { print "." }
while ( ! SPI2STATbits.SPIRBF...
The best thing to do is use an oscope to look at the SPI lines to determine where the problem is. You can then determine which end is getting confused.If you don't...
If you write vanilla C, it should be easy to port. Pay attention to the undefined and unspecified lists in C (get the latest draft standard - it's free and close...
It sounds like the PDF is going to be your biggest effort. The rest is just glue.My one piece of advice is: CODE THIS ON A PC. This is a benign environment. Keep...
Write an ISR (Interrupt Service Routine) for a timer. Use a convenient pin and set it == 1 when you enter the timer, and 0 when you exit. For development, put in...
It should have returned an error code. They are your friend.Can you read the FAT itself? Parse through it and verify you are creating it properly. Can you use a...
You can use a timer ISR to bit-bang your PWM outputs. And if you always set each output pin, even if it is the same value as before, you can easily create deterministic...
@rtomkins:I concur. Basically, stuff you don't think about being embedded. (For relative values of "you" :^)I tried to give you a beer, but that function seems to...
Spot-on about the interview process. The ones I *really* hate are the timed tests. I have a zero success rate. These tests are useless in what they are trying to...
Part of the problem is the title "embedded systems engineer" (ESE) is a bit loose, and is not a pure "systems engineer" role. Everything jeghartman said about a...
one step at a time - verify and understand each step before going onto the next.. systematic will work....
Well, first you need to determine what the format of the "mass storage device" is: FAT16, FAT32, etc. How was the directory structure created?TO start with, you...
Well - a death-march on a project with a PIC24 and one of the worst POS compilers (CCS) will do that. It could not even do a U32 divide the same way every time....
Not sure where you live. There should be a hacker/makerspace near you. See hackerspaces.org or http://themakermap.com/ - keep in mind the may not be totally accurate...
To expand on Alexmouse's comments:Main.c and IIC.c are compiled separately. The linker needs to know about Main.obj and IIC.obj in order to make a .hex file that...
It looks like you are looking for an EE who knows how to write code. Not necessarily how to write good code. I would have difficulty answering your questions, despite...
Now we know. appreciate your diligence. I expect one or two might slip past you (they are fiendishly clever), but just do your best.
Simplest method I can think of is write a byte that indicates you started the write sequence, then write a different value to the same byte indicating you have finished....
Arduino!Look at what adafruit.com and sparkfun.com have. Get a "normal" arduino && a motor shieldhttps://www.adafruit.com/product/2488 a "normal" arduino ...
A bare metal app is basically an init followed by a loop. The OS version supplies the ability to have several processes running at "the same time". (in reality,...
What rtomkins said.Read the datasheet. Not once or twice. It can easily take 5..10 passes through it before you really get a grasp on it.Go thru the register setup...
Well: "Can someone suggest a simple solution in layman's terms."You seem to want to successfully leap half-way across a canyon. What you want to do is somewhat...
Now *that* is a cool little board! I will need to remember that...I wonder what the drift specs are... Remember: there is one constant: gravity sucks. I did a cheap...
You will need to do two things:1. physically tie them together so that the gyro data is meaningful to the image data.2. treat the gyro board as a slave to the image...
An RTOS is needed when timing is critical. From your description, this does not sound time critical. So - any "normal" OS would work.If you don't want to roll your...
You already have an ISR defined:#pragma vector = ADC10_VECTOR__interrupt void adc10_interrupt(void){__bic_SR_register_on_exit(CPUOFF);}Scope: look at rygol DS1054Z ...
A standard method is to setup the timer to call an ISR function when the timer hits a count. (Hint: you can setup a timer as a downcounter, so the ISR is called...
You might have better success by going to an embedded Linux forum than us. I suspect most of us are RTOS/bare iron folks - not that we are against Linux, we just...
I got hit with a meeting at the same frigging time of all hands by my manager.So - if I win a drawing, I cannot respond. is that going to be an issue?I am really...
Find a hacker/makerspace near you. The best list is hackerspaces.org. Many hackerspaces in the US host meetings of Old Fart EE's That Love Old Radios - I assume...
The most common (non-RTOS) is a "command loop":init()loop( forever ){stuff()}On shared memory/semaphores/etc: Modern micros offer HW support in the form if "test...
Sending a message with the data is the traditional way of doing this. More to the point:1. are you only updating a byte or two, or is it a lot of data?2. is this...
Another trick.Have a ram copy of the main sector header and the current sector header + data (ie a buffer for the entire sector).On the fresh init (never been booted)...
Perhaps an example would help.Sector 0 is your "head sector map". sectors 1-8 are your data sectors.Init is writing 0xFE (1111 1110) to sector 0, and writing a...
There are many different ways of doing circular buffers. in my example, I defined a BUF_t that assumed a circular buffer - I threw it together quickly. In reality,...
#define NUM_MSG 16 // entries in the circular q#define MSG_SIZE 48 // a messagetypedef struct{ uint8_t msg_buf[ MSG_SIZE ]; ...
Consider using a struct for one message && use a circular buffer of structs. The struct can actually be a union of several message types.A struct is just...
Do you have an oscope? Can you look at the I2C bus? can you look at the UART bus? Does your serial (RS232) bus have a level shifter, like a MAX3232?Start with a...
Quote: Also, I'm really curious why you didn't use a cheap ARM processor instead of making life difficult for yourself, and also limiting the number of people that...
Frosted?Google for specialty glass companies. Also consider pexiglass, because broken glass is Not Good Very Bad.Take your laser to a glass and a plastics stores...
In I2C land, to read a register:write the device with the device address and the register addressdo a read of the device with the device address, then read the value...
Get a simple DMA working for some device (eg UART) to memory. You have a lot of moving parts, and you need to solve the pieces before you can solve the big one....
This is not my area of expertise. But - some basic googling finds that the RSSI maps to dB and the higher the negative number (dB) the better. The closer you are,...
Can you add a command to the chip can respond with a majic number? Pretty standard to have a command that returns capabilities (eg a rev number).
This should work for most architectures. You also did not specify the MPU chip. Some older ones require a uint16_t as a long.uint16_t val = 0x2A02;printf( "val =...
Generally, DMA needs either a memory buffer or a device register. It looks like the ssp0 device register is either not getting set correctly (the picture shows 8008,...
For development, you should be running off wall power. When everything is stable, then goto batteries.And get the rygol oscope we are recommending. You will be way...
If you mean following the admin tree, it was quick. I had the part number in less than 10 minutes. I have used the same technique for obscure nerd questions and...
I say this gently: You need to try things like swapping the caps before posting. You need to do your homework first. And this is where an oscope is critical. If...
Ahem: "Welcome to the real world, kid." Keep at it. We all have these scars.Remember - simplify, simplify, simplify.This is the kind of issue that takes 2..3 hours...
And this is where having an oscope would be handy. You could load code that all it does is init an output pin, then loop, just toggling the pin. The oscope would...
It looks like mode 1 will work for you (normal UART case), but I did not look at the chip datasheet.The 9th bit is used for multi-drop RS485 serial networks. Each...
A few things:1) Matthewbarr is spot-on. He is saying everything I would tell you. This also includes CustomSarge - we are all heavily scarred veterans of the embedded...
Echoing @matthewbarr: you really need an oscope to be in this biz. The two best tools I own is my Estwing 20oz framing hammer and my Tek scope.I highly recommend...
You need a scopeThis is a really good 4-channel scope under $400https://www.rigolna.com/products/digital-oscillosc...model: DS1054ZYou did not hear it from me, but...
Write the algorithm in C, run it on a PC, and print out the results of each step. Pick some obvious sets of values and run the C code. That way you will see the...
-- You>> 1. what are the 24-bit numbers for?24-bit is the maximum bit capacity. Meaning the numbers I want to store would be as large as 1,000,000, so therefore...
Not quite understanding what you want to do.1. what are the 24-bit numbers for?2. are you using fixed point math (eg the 24-bit numbers already *100 for two-bits...
First, LOTS of good stuff in this thread!Second - my father, who at one point (late 60's, early 70's) was one of the top operating systems designers. He taught me...
Reading datasheets is an art and science. And sometimes they lie. Be aware of the errata sheets - they are what went wrong, and can save you lot of time.You can...
Point taken.We have such incredible tools and resources today. My father worked at GE Computer systems in Phoenix in the 60's. Memory (core) was in the kilobyte...
Wow! Shows what an obsessed nerd can do with the tools available now. You have done what 20+ years ago took an entire team to do, with the resources of an Intel...
Can you show that part of the schematic? I'm confused because the datasheet suggested connections and your description are confusing.
uC/OS - free until you create a product - has a bunch of "add-ons". Excellent books on how it works. Highly Recommended.FreeRTOS. Not sure about the securityI am...
Look at https://en.wikipedia.org/wiki/Serial_Peripheral_In...You are the master. the CAN controller is the slave.I have not used the LPC2148, but the datasheet...
Not sure what you mean by a SW oscope.Set the period to one second, duty cycle 50%. Output to an LED. You should see it blink if you are truly getting an output....
Terrible when management cannot do 3rd grade math... I suspect you were "let go" because you had the temerity to argue with management...One technique I use is a...
A multimeter does an integration of the input voltages. Basically, it is taking an average. The swing between min and max is too fast for the multimeter.When the...
Well, EAgle is now $100/year. Kicad is free. They just released v5.0One of the open questions for me is how much effort Autodesk is putting into Eagle to keep it...
The other posts are spot-on, although I have never seen Samek's stuff - I'm 61 and been doing embedded since the mid 1980's (and wrote a lot of 8080 ASM in the...
I have written (maybe) 50 lines of Python - sucked in data, munged it, printed it. Hides a lot of the cruft - understands walking arrays.So - I bet I could learn...
You are spot-on.I must say you have given me the first real reason to learn python - I am a long-term C guy and python is a bit of a toy language (where is my flame-proof...
Cool!time for a beer!!!(I really meant for you to have a beer to celebrate - but I *do* appriciate the beer! My firsrt one here! WOO WOO!!
Simplify, Simplify.Never even heard about Dynamic C - thanks! .. I will have to look at this.From my reading in the last few minutes, DC uses a static area for...
I would like to see a discussion on SystemC - tools, techniques, barriers to entry, tricks of the trade, etc.
There is a trick.Call NXP, and ask for the *admin* of engineering. Tell the admin you are a nerd and have a serious nerd question about this specific chip and you...
This is really a hardware problem.I would *really* not try to fix it in SW, unless you have no other choice.
I gently suggest a call to NXP might not hurt.Can you measure the osc frequency without disturbing the reading? I assume this was one of the first things you tried,...
Have you contacted ARM (and/or NXP) about this? Since the RTC is internal to the MPU, and it works correctly when the MPU is powered, it seems the crystal/cap are...
What is the RTC and what is the crystal you are using? Is your circuit exactly as specified in the RTC datasheet?Are you using a fresh battery? did you measure the...
Silly question: If you can compile and load code onto your board, why are you trying to download a file? Why not just compile the info as needed and load it to your...
So bare-iron.I'm not sure how to answer your question. I have written dozens of bare-iron and RTOS device drivers. I would start with polled to understand the peripheral...
Teensy HID has the host side source code for all three OS's, with build sequences (makefiles).Don't get confused by form vs content. In your case, the I2C (vs USB)...
A hack approach would be to look at the Teensy HID driver. This is intended to make the Teensy be an HID driver over USB look like a normal HID device - it supports...
This is why you need to look at the signals on an oscope. It will tell you if the slave is clock stretching. Otherwise you are groping in the dark. Borrow one from...
The SMD resistors are probably the I2C pullups. Use a meter (when the system is off) and look for what pins on the chip are attached to the pullups. Hint: one side...
Put an oscilloscope on SDA and SCL. Look at the full waveform. Your example above is short enough. You are assuming your sniffer is telling you the truth. it may...
Never built any. While I am an embedded guy, I have been doing non-arm/keil stuff. Last time I used ARMs was 2012, and we went with IAR.(BTW - I love ARMs. I have...
Since you have enough of a clue with version control, I would not worry about the SW packs. You can always re-use the code (and that is a Good Thing!).
The "Request" looks like a read command for information. Often, the order is to send a write with a register number, then do a read for a specific number of bytes....
You changed the (implied) requirement from a single master + slaves to multiple masters.I don't know if you read the document via the link. It lays out how to do...
Just pointing out MODBUS is transmission-agnostic. If you do full-duplex, you can broadcast from the master any updates on info.You can also broadcast which slave...
Wow..First, I agree with the other responses. This would be a senior-level project in a combined EE/Embedded/CS 4-year university course.If you are dead-set on this,...
There is a tool called SystemC that converts C (and looks like C++) into a HDL form. See (the first couple of responses when googling "systemc")http://www.asic-world.com/systemc/tutorial.htmlhttp://www.asic-world.com/systemc/index.htmlhttps://www.doulos.com/knowhow/systemc/tutorial/I...
SPI is really two shift registers: one on the master, one on the slave. When you put the first byte into the master's shift register (you "write to the master's...
I would suggest looking at Micrium's wear-leveling file system. I know they have put a lot of effort into it. And, IIRC, it is DO-178 certified (uC/OS at DO-178B...
Pro tip: If you are in the area of these types of shows (you live nearby or are going to visit), sign up for the exhibits-only. Usually free. (If you wait until...
To state the obvious: an embedded system exists to receive in some input(s), process it, and output some value(s). There are variations on this, for example I did...
And ... create your lowest priority task to monitor the stacks. Start at the bottom and look for the "high-water mark" where you hit the end of DEADBEEF, meaning...
My default is gcc, because it is available for just about every MPU out there. I have yet to see a bug, although at high optimization levels it will remove code...
Use this form to contact mr_bandit
Before you can contact a member of the *Related Sites:
- You must be logged in (register here)
- You must confirm you email address