Spooky action at a distance!
Something doesn't go quite right with testing the programmed Padauk 3 cent micro.
5th and final part in the Padauk 3 cent micro Free PDK video series.
Forum: https://www.eevblog.com/forum/blog/eevblog-1306-(5-of-5)-spooky-action-hardware-testing/
#Spooky #Hardware #Testing
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
AliExpress Affiliate: http://s.click.aliexpress.com/e/c2LRpe8g
Buy anything through that link and Dave gets a commission at no cost to you.
Donate With Bitcoin & Other Crypto Currencies!
https://www.eevblog.com/crypto-currency/
T-Shirts: http://teespring.com/stores/eevblog
Something doesn't go quite right with testing the programmed Padauk 3 cent micro.
5th and final part in the Padauk 3 cent micro Free PDK video series.
Forum: https://www.eevblog.com/forum/blog/eevblog-1306-(5-of-5)-spooky-action-hardware-testing/
#Spooky #Hardware #Testing
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
AliExpress Affiliate: http://s.click.aliexpress.com/e/c2LRpe8g
Buy anything through that link and Dave gets a commission at no cost to you.
Donate With Bitcoin & Other Crypto Currencies!
https://www.eevblog.com/crypto-currency/
T-Shirts: http://teespring.com/stores/eevblog
Hi Welcome to the final part of our product: Three Cent Microcontroller Programming Series where we build up some open-source hardware and software to program these Three Cent Microcontrollers. Now in Part four, we took a look at actually are using the SDC C compiler the small Device C compiler to actually program a file and generate an Intel Hex file, which then we can use on our programmer to program our little chip. So we're basically just taking an existing pre-written example file and compiling it, generating the Intel Hex file and then simply running the command-line programmer to program that Intel Hex file into our chip. Sounds easy, but you guessed it.
Murphy Hmm yeah, this is gonna be a pain in the ass. You'd be amazed. What can go wrong with just doing that? Let's check it out And there it is. I Didn't bother with any of that bypass capacitor rubbish.
Don't need that. And yes, I'm gonna say it, we don't. Winner chicken dinner. Of course it works.
and I Have no doubt that actually says hello World if we actually jump in and single-shot capture that and what does it? Oh, that looks that looks very clock like to me. Actually, that doesn't look like a Hello World. Oh, we can make God sir, it's outputting something. Oops, dumbass.
Dave Eagle-eyed viewers will no doubt see them. I probe the wrong damn pin. But there we go. Oh oh, hang on that does.
Oh Does it need a pull up? I have that looks better? I Think we have a dodgy connection issue because it's all over the shop Anyway, yeah, that's actually probing though that's actually not probing the zero the bit zero. so a pin zero or whatever. so that's probing one over. So I did.
Yeah, hmm. Anyway, that's the one I get the signal Wow Check this out. Yes I had to swap our scopes to this brand-new were siglent a 2000 X plus a series because my case on my little keysight 1000 I didn't have the serial license so I couldn't yeah do any serial decoding. so I've switched Anyway, Watch this.
Watch this. This is really weird now. Like you think, okay, we're getting data out. it's not on the correct a it's not on the correct pin we expect.
But watch this. Watch this if I put my hand near it. oh look, look, look magic voodoo Oh spooky action at a distance I'm not kidding like this. and if I put my finger on the probe, look if I if I touch it very lightly and if I touch it harder it I can make it completely vanish.
Wow So we're actually that's the pin that we're supposed to be getting out and we're not. We're just getting some crusty stuff on the ground there. so it's that pin there which is pin 6 and pin 5. We're getting something as well.
Just realize that pin fire since. no. but look if I hold my fingers on there, take them off I'm literally spooky action at a distance. Yes.
I've put a bypass cap on there I've checked the connections and everything else. So when you start seeing weird stuff like this happening all right, there we go. there's our packets. When you start seeing weird stuff like this happening and like spooky action at a distance, you have to assume that there's some sort of floating input happenin and it's of course picking up. like the 50. Hertz from my fingers. Right as I get close, there's there's capacitive coupling through the air into the air pins. Now, of course this thing doesn't use.
Oh, there we go. I can make it die completely. These things, aren't it? It doesn't have you saw the code. The code doesn't have any input whatsoever.
It's supposed to be using internal later and then simply outputting data. but those keen-eyed might have seen that in the code before that this actually works on interrupts. So that's what I'm thinking is that it's got the wrong chip target in there because I believe the code was for the PMS one, five, four. we've got the one five, four, C and I'm wondering if that makes a difference.
So anyway, we'll look into the code in a minute. But yeah, when you start seeing spooky action at a distance like that, something's floating. So what I'm going to do is just ground some of the inputs cuz they're all floating at the moment and see if that makes a difference. hi I Just tied pin too high here and that's already killed the output.
So yeah, something's going on. Let me just lift that. Oh whoa, whoa. This is weird stuff that I you know I'll lift it.
Okay, there it is. Let me touch that. Yeah, you know that. I can I can change that just by touching that input Wow And by the way, these are this is 0 to 5 volts.
These are real genuine totem pole driven hard. You know. outputs? these aren't You know. This micro is not mucking around, it's it's actually genuinely driving those output signals hard.
So it's you Know it's not just the output flapping around in the breeze. something's causing. My guess would be something's causing the input. There's some input somewhere because the chips configured wrong.
Somehow it's goofed it up because I don't might have the wrong chip type or whatever and the configuration registers were different or something. and it's just configured at oddball II to have some sort of an import which might have an effect on the interrupter routine. That's you know, sending the output data. Hmm, Oh, look at this.
the p FS 1 5 for the PFC not I've got the P M s. Ah, like all these confusing numberings and things like that, I mean P P MC 1 5 4 Can you even buy that? Is it a thing? No. Is it on the Produc website? p MC There it is. We've got different types: the PMC one, five, three, one five six.
the PMC one five four is not even there. It's just Oh Anyway, so I would imagine that because look, they've got different they've got if the Deaf's in here right? if define if it's the Pms 173, if it's the P FS 154 the PFC. That's why we've come and got sir because these it has different register addresses for all this sort of stuff so it's a wonder it works at all. So it looks like there are subtle differences between all the modules and I am. We would imagine that the Pms is different as well and we could go in there and search all the register entries and stuff like that and try and fix this up. So I think I'm better off just going over and finding some other code like this one. Does this one work? Here we go: I Found like a blinky thing with the timer. Does it say anything about time? III Q a blink.
This one actually doesn't say anything. this one just says right? So here's the original mini C code they call it which is I guess Paducah see and they've comment and all that out. And here is the new code but doesn't say which one this is actually will compile for. But hey, if takes me like a minute to like compile this and program a new chip.
and I've got lots of chips even though they're one-time programmable. I've got a few. So yeah, we can afford to do this. and and that's the thing like, even though these aren't flash, you can still like these are so cheap.
They're three cents a pop so you can actually have four. I Know it's like a waste, but you can actually afford to refine your code like this. and once you get a perfect and just go through, even if you have to go through 50 of these things to perfect your code once you do, Bingo is set in stone. Because these programs aren't big, you know they're pretty easy to test and actually refine and get working absolutely perfectly and thoroughly.
so that yeah, you can be confident that you can program there's one time chips once your programs or debugger and stuff like that. or you can go. or you can buy the emulator and use the emulator and stuff like that if you really want to do that. But anyway, yeah, at three cents a pop, you know I wouldn't be complaining about burning through a few of these literally.
you're a week now. Interestingly, on the Eevblog forum post over here I Found an extra option programming option here D PFS 154 So it like all PMS one 5c and I actually just tried that compiling this, adding that option in and it does actually work. it didn't recognize lower case as you can see we reckon so maybe I could recompile the other one with That DPMS 1, 5, 4 C option and see if that works. Um, that'd be an interesting test.
So anyway I thought I'd just redo that. the project I gifted I did text again test test There we go. so it actually compiles that. So now if I go test dot C and test dot da sorry dot rail and then I hate You really need a script to do this stuff you know like a program someone can do like a simple program that just puts all these options in you like checkbox.
I've got this chip and it automatically knows it's a 14 bit architecture and it puts in the option for that and stuff like that. So anyway, test dot real test dot I Hex Boom! Okay so I now have a new test dot IH x Yep okay so I'm going to program PMS 154 C right Test dot I Hex Okay I've got my chip in I should have probed the first PMS 1 5 4 C right Done, let's try that. No that was worth a shot but still on the same foodie thing so yeah, didn't make a difference. it's it's the code. Anyway, what I'm gonna do is this interrupt-driven LED blinky program over here which is for a mysterious chip never know your luck in the big city so let's try that. I've got that saved as test to to end to MPN s15 for device boom test to real test to Intel hex Boom! And if you're wondering why I've changed my t-shirt um, it's not because I've come back later or the day later cuz I'm filming this over multiple days. it's because the other one I was wearing was just generating too much static and I didn't want to be like him I don't want to have to the SD strap. So yeah, right.
Test two Done. This is too easy. We're no winner chicken dinner and let's see if there's any funny business going on here. This is just like doing like a one second thing.
What's the time base there? 500 milliseconds per division? Yeah and now it's still doing it I don't know how to get role mode on this thing. it's just a choir in and then it's got to update the screen. Um, it. This seems to work fine if I do the other pins.
Nope, Nope. I only get OOP There we go, it's disconnected I only get that so that works. Um, so yeah, if we want to get the hello World thing working I think we have to go in and figure out what registers are wrong there and like you know what what's actually up with that so that could require debugging I'm not sure I'll do that. What if like I was seen like a you are now put with Hello World.
We almost got it there. It's the silly bugger business going on. Anyway, there you go dumbass. Dave Didn't see the roll button over here.
There you go. So that's our. If we probe the other other pins you can see we get zippity-doo-dah because it would. That's actually not an output.
so we're actually picking up crap there. So yeah, if I touch that, we're picking up my 50 Hertz there. So yeah, they're configured as inputs, not as outputs. Only Pin 7 there is configured as the output.
So we're getting out like a one-note signal and that comes from an internal interrupts using a like timer based interrupter divided by the main internal clock. Fantastic! So there you go. We prove that we can program a chip. No worries.
What? Wah wah? Be careful pulling these out of your bread boards. There's the spring. Where's my other spring down there? Oops come a gutter. Alright, so I just might have a quick look in header format here.
Register mapping scroll right? Don't know what that is but programmer notes Oh special code founding PMS Won 5-4 B I Finally got to see what the special aha register map in. Here we go. This is what I want: 150 FS 154 There you go. So we should be our two. PMS PMS 150 C I Assume it's the same for the 1. 5 4 is at the same scroll. Yeah, that's why it said scroll. Yes cuz you got a scroll across one fire is it got the other ones 154 You miss one 5 p FS 1 5 for PMS 1 5 2 years So I think the 150 this is the one we want I I think the PMS 150 C because we got the C version so I think all the ones there just like different art size pin outs and stuff.
So the internal registers should be the same. So our program our code over here is written for this p FS 1 5 4 Here it is P FS 1 5 4 So we have to modify anything that's related to the p FS 154, change it to whatever we can get to the equivalent one for the 150 C and hopefully we get our program working cos yeah, what's actually causing that weird ass fault I like I can only imagine it's getting meaner up from an input pin, a floating input pin, some health, huh? Well no. I'm actually comparing all this stuff here between the one, the PMS and the PFS 154 and they're all the same. like the port a register, the port, a control which is the pack register, all the interrupts stuff in an interrupt request.
the timer is all the same, they're all the same address so like and we're not calling up PDK 15 so it should give the else I guess I could simply take out that Co just in case it's doing something weird and only have that perhaps if I get desperate, but that should work. apart from that I don't know what? like registered like what bit operations are happening here I haven't gone that far in, but if we've got the right registers, they should operate in the same way across all of the different devices. you know, like like the interrupts register should have the same bits in it for all the different devices. it's just a different address that the interrupts register might be at I don't get it.
factory calibration: I mean the time it seems to be working and everything seems to be doing the business. but ah, very strange. very strange port a control. there's that.
you know the bit that we're turning on I don't even see that actually working properly. So maybe I can just make them all outputs or something like that, make them all output. see if that makes a difference. So yeah, I am I am not seeing it based on that register.
so I don't know. um maybe people screaming at me in the comments going oh Dave it's obvious but I'm not I'm not seeing it no. I was hoping I could just modify some registers, but anyway, it might have muck around. but yeah, if I don't update you on this, it means that my market rounds weren't successful.
Nope. Unfortunately, are taking out all that stuff didn't work. It does exactly the same thing. so I have no idea what's going on there I Could spend ages trying to troubleshoot this a bit.
Anyway, that's not really the point of this video. The point of this whole video series was to show you how to take a github project that you might need for some particular purpose and actually order all the parts, order the board, assemble it, and then test it, get it working and potentially debug it, and then get all of the software actually working. All these sub open-source programmers software wasn't as trivial and trivial as I thought it might be, and we ran into a few interesting hurdles there that we had to overcome. So I really like it when that sort of thing happened. So anyway, if you like that video, please give it a bigger a thumbs up and as always, comment down below and especially want to hear about this format. I did ask this of my our supporters I took a poll and the majority of people said yeah, they want to see this sort of like longer form like follow along with Dave as Dave goes through and bumbles his way through because like the whole process rather than just some you know spit-and-polish tutorial where nothing goes wrong. Sure, I could edit this thing til the cows come home to produce like a single 10-minute video of Here's how to you know, get the Paduka software actually working and the hardware and software working from the go. But and if you want that, please leave in the comments down below.
Maybe I can take like this existing multi-part tutorial and actually condense it down to a more manageable 1015 minute type instructional video. But let us know what you think about the you know. Follow along as things go wrong and we have to troubleshoot and we have to bumble around and figure out this problem and solve that problem and things like that. So yeah, in the comments down below and of course yes, I'm gonna shout out my library' Channel I think I'm at 20,000 subs I was like 19 990 something.
So by the time this video comes out, sure, I'm over 20,000 which is absolutely fantastic. And of course I I never really mentioned, but I've got a Patreon as well where you can often get access to early access to videos. I actually released them early, including this particular series as well. So if you want my early stuff, head on over to Patreon Having a bit of trouble with my discord server as well and also I have other channels I still have my shoot channel I still upload my videos on Vimeo I batch upload and other places.
Heck, I still even have my RSS feed from day one which is a 720p one hosted directly on my own web server as well. So yeah, anyway, that was good fun I enjoyed that process. It took a little while but we got there I Expected a few hurdles. let's hope for a few hurdles and we got it.
Beauty anyway. I Hope you enjoyed it and found it useful. Catch you next time.
Phillipines washing her๐
Home town
Mindanao iligan city
Oh! That was so painful to watch! Iโm pretty sure I know what the issue is. Donโt know if I missed the check butโฆ
When you have โspookyโ things going on you probably do have something floating – THE RESET LINE!
Always make sure you have an external pullup on the reset pin for these things. PA5 I believe it is for the 154 – that also counts when itโs used as IO pin. (Found that out the hard way)
Like the series. Now I don't feel bad about flailing with Zadig? or whatever it is and the USB drivers in the past. Seems like there was also some antivirus issues.
I love these long stream where I can see successes as well as the fails ( actually these make me feel less stupid by the way)
Hope that you can sort out that ic socket that disassembled itself.
As a retired Analog IC designer from NSM and LTC, You have just made the best argument for staying within the Analog domain. The digital realm with its ucontrollers etc. can be very powerful but even more frustrating to find the exact programs to get these things what you want them to do – WORK.
I think that you should look into designing and building your own 2 ch, 50-100mHz oscope for the under $150 USD market just as you did with your DVM project.
๐
The whole series is pure awesomeness man, ive loved to see you figure stuff out and point out places that if i were to try id fail at aswell.
My first middle name is Murphy.
Could you really used electret condenser microphone to harvest acoust to electrical energy enough to power cellphones or Leds?
I read a paper being published. Was it really true?
I know why there is no part 6 to this series.ย Dave could not get it to work.ย He is way over his head.ย When you can't get your processor to even say "Hello" then you really don't know what you are doing and will never get it to do anything complicated.ย ย Dave you are prettyย good at hardware,ย but your software skill set is nonexistent.ย Don't give up your day job.
Is this this ghosting everyone is talking about?
I'd love to see a speed run with marked turns overview of the series in one episode. I'd certainly watch both, but I might recommend the two to separate folks. Great series.
Serial license haha typically modern
Is there any chance of a "6 of 5" with some code running successfully ? I'm interested in what the catch was and would like to see the fruits of your hard work.
You could make a batch file to automate this, you can use command line variables with batch " .bat " files to take in the source name and flags. Before windows that's what I did in Dos.
Would you still be interested in Raspberry Pi Supercomputer Cluster? In part 2 of Raspberry Pi Supercomputer Cluster you showed that there were board mounted Ethernet connection. The Raspberry Pi 4 with the PoE hat could make the board a lot easier.
Hey Dave! I've seen this incredible product advertised all over youtube and I think you should investigate how amazing the solar panel performance is. It's a 20,000mah usb power bank with a small solar cell that charges it in just 1 hour- 20 amps! What an amazing scientific breakthrough to get a 100w panel on such a small device. Check out lit solar. And please ruin them, the lying pr**ks. ยฃ100 for a power bank?
the "follow along as things go wrong" is the most educational I find. You end up bumping into all the dead ends and red herrings and such. Ends up being instructive beyond the current project as well.
Thanks for this set of videos! Great way to learn.
Super video ๐
regarding the format: I love the idea of play along with Dave. It does more to expose the traps for young and old players and as a teaching tool, it's nice to be able to see you fumbling around and fiddling with stuff and maybe chase the odd red herring or two. it does wonders to expose your thought process and it helps me figure out if I'm thinking about something from the wrong angle