TIPS & TRICKS for the 3 Cent Microcontroller | Practical Programming Guide

  Рет қаралды 3,783

OverKill Projects

OverKill Projects

Күн бұрын

OverKill Projects - 0x019
TIPS & TRICKS | Programming the 3 cent microcontroller
========================================
Intro to the 3 cent micro: the Padauk PMS150C - Part 2
Part1 is here: • HOW IS THIS 3 CENTS???...
========================================
Stuff in the video:
========================================
Code examples:
github.com/ove...
Padauk ICE:
lcsc.com/produ...
Padauk PMS150C:
lcsc.com/produ...
========================================
How to Support the Channel
========================================
Consider supporting the channel at Patreon:
/ overkillprojects
========================================
What I make videos with
========================================
Artlist is the best place for music, and if you use my referral link, you get a couple of months free!
artlist.io/Wal...

Пікірлер: 31
@dennisdecoene
@dennisdecoene 4 жыл бұрын
This needs many, Many more views!
@tze-ven
@tze-ven 2 жыл бұрын
The issue related to multiple interrupts sharing the same ISR is a common problem on other MCUs too (from 13:10). The interrupt flags and interrupt enable bits are 2 different things, especially on timer peripheral. Even if you've disabled the timer overflow interrupt, the overflow flag does not just freeze. And yes the way you overcome it is the usual way that is done on any other MCUs (STM32 for example), but I wonder why would do that. If you intended to check for an overflow in the ISR too (and therefore wrote the code for it), then you would have enabled its interrupt. Otherwise why would you put that code there in the first place? 🤔
@4youian
@4youian 4 жыл бұрын
Thanks Walt - useful info. Cheers, Ian
@Shooo117
@Shooo117 3 жыл бұрын
U may upload content regularly...u r chnnel is awesome
@BLOitouP
@BLOitouP 4 жыл бұрын
Definitely useful. Thanks mate!
@wizrom3046
@wizrom3046 Жыл бұрын
Since the micro has no modulus instruction, i would never have expected a mini C implementation of modulus which requires a divide/mult. Then of course the micro does not have a divide instruction either, so modulus needs a divide library linked in! And probably a mult library too! I'm guessing you have not programmed in RISC assembler much? I expect the mini C to just give you a "C like" way to input the assembler code. For your array problem it would probably have accepted; i++ array[i]++ Anyway, thanks for an interesting and thorough video. 👍🙂
@mrechbreger
@mrechbreger Жыл бұрын
the funny thing is the ide says too difficult to implement! I abandoned their UI and I'm using SDCC with those parts. Testing can be done with a flash part which is similar. pointer handling is crazy with their mini-c ... it's not worth to learn that. With sdcc you can just go for it the normal way.
@marcarleto79
@marcarleto79 2 жыл бұрын
Thank you very much for these videos bro, I'm thinking about using this microcontroller for a very low cost project at my company but I have some doubts: -Is this Padauk PMS150C reliable? -Is it active? Because we need it for at least five years from now; -About the program memory I saw in the datasheet, it's an OTP (One Time Programmable) memory which means I can program and debug only once (?!), so how do I get around this?
@overkillprojects8091
@overkillprojects8091 2 жыл бұрын
It's very low cost for a reason, certainly, but I don't think you will have any major reliability problems as long as it's used in "normal" conditions (I wouldn't expect it to perform well at 130°C, for instance). As for long term support, you should reach out to them and ask, they might have an official support window. And there is no way around OTP on a given device (at least, it wouldn't be worth the trouble) just include an appropriate header and use the in circuit emulator and you can reprogram as much as you want during development.
@robodurden
@robodurden 2 жыл бұрын
Thanks for the two videos! I would like to build a 128s BMS (high voltage LiFePo4 battery management system) and simply giving every single cell its own microcontroller could be the (first) perfect use case for this super cheap chip! But i fear to spend time leraning a new product family. So i would like to hear you opinion on this :-) All chips have a comperator but i only know adc. So should i go for the PFS173 or might some OTP be enough ? My 128 MCUs would need a serial protocol where the TX of mcu-n is using a npn-transistor to pull down the RX of mcu-n+1. I think the 3 kW (=6 kB?) of the PFS173 should be enough to code a softwareserial. I am not so sure with less then 2 kW. Is the internal voltage reference precise and stable enough to measure the 2.0 - 3.6 Volt of the cell that it is connected to ? Do i not need adc which would break the 256 values down to 0-4 Volt but a comparator could be used to spread the 256 values onto 2-4 Volt ? Again, i do not really know how to work with comperators :-) What do you think of my idea ? Greetings from Germany :-)
@bertbrecht7540
@bertbrecht7540 2 жыл бұрын
You are obviously a seasoned career embedded professional and I am at hobbyist level but am itching to dive into this microcontroller. All I need to pay for is the emulator and the microcontrollers? Do I need hardware to flash them? Assuming I memorize both your videos, will I still face rough roads making these things work?
@overkillprojects8091
@overkillprojects8091 2 жыл бұрын
You will need the programmer, the emulator, and some of the actual micros. Development isn't terrible, I think (although I'm biased) that my videos about it are a good starting point. I don't think development is all that bad, there are just a few things that are a little weird if you are used to programming more mainstream micros.
@lovelya72
@lovelya72 4 жыл бұрын
Nice video about the Padauk micro and official IDE! There's currently an open-source compiler software and programmer hardware project going on. It's called FreePDK on GitHub. Check it out if you're interested! The compiler also uese standard C that supports vairous of std libs instead of mini-c.
@tempvoid7680
@tempvoid7680 4 жыл бұрын
So for some one it's not hard to implement?)
@lovelya72
@lovelya72 4 жыл бұрын
@@tempvoid7680 Not at all, padauk's architecture somewhat resembles a more popular micro that designed by Microchip. Which already have limited support in SDCC(the C compiler that FreePDK uses).
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
Hey bro, could you please make video on how to program mediatek arm processor 🙏🙏 By the way your channel is best channel I have ever seen 👍👍😘😘
@overkillprojects8091
@overkillprojects8091 3 жыл бұрын
Interesting request... which processor do you have from them and how did you get it? As far as I'm aware they don't sell chips or tools through the usual channels, except for the odd wifi module. ... also what are you using it for?
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
I don't have any idea about them but I want to create my own phone..like keypad phone .I opened old nokia keypad phone there I saw mediatek mt6261. Other keypad phones also uses same ic,so why can we creat our own phone os . if you have any idea about it please make video. By the way I love your videos ❤️❤️❤️
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
We can also get motherboard of keypadphone without programmed....
@overkillprojects8091
@overkillprojects8091 3 жыл бұрын
This sounds fun. I am considering this. Is it cool to see it all hacked together from stuff you can easily buy? Or would you rather see a finished product with custom PCBs and stuff
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
@@overkillprojects8091 could you please make it like that so I could buy that stuff easily👍👍👍👍🙏
@costarich8029
@costarich8029 3 жыл бұрын
Do you need to the Interrupt code in a loop so that if tm2 fires first and then t16 fires while tm2 is still working, you will loop back a second time and pick up t16? Then the third time through the loop nothing happens and you exit.
@overkillprojects8091
@overkillprojects8091 3 жыл бұрын
The problem with that is that when t16 fires, it will reenter the handler from the beginning and just run to the end then resume tm2. So each block needs to check that it is in fact in scope for the interrupt that actually triggered the handler. It's not the worst thing ever, it's just that the example code is a little vague and you only notice it when you do a project with a few handlers.
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
Hello I need your help again 😅, In c programming I am making a program for a amper meter and I want to turn off a specific device if ampere is equal to that we set. But the ampere is not constant and i can't use == command . I want that insted of == is there any command where a number shouldn't be equal but between the 5 difference. Ex. If I set the number 35 then it should turnoff my circuit between 35 to 40 . Please help me🙏
@overkillprojects8091
@overkillprojects8091 3 жыл бұрын
I think you are looking for two less than or equal to conditions? If so you can do, e.g. "if ((y >= 35) && (y
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
@@overkillprojects8091 yes your correct but that 35 and 45 will be random number...
@overkillprojects8091
@overkillprojects8091 3 жыл бұрын
@@ranaremotecompany912 hmm so the comparison values can change? How do you determine them? If your values are amp_limit_high and amp_limit_low, you could do "if ((y >= amp_limit_low) && (y
@ranaremotecompany912
@ranaremotecompany912 3 жыл бұрын
I can do your suggested idea but I don't want that the user should have to set ampere two times and I also don't have space in my microcontroller I am using pic 16f688. There is more in my program
@overkillprojects8091
@overkillprojects8091 3 жыл бұрын
@@ranaremotecompany912 i think I'm getting closer to seeing what you want lol. How about ((y >= amp_limit) && (y
@graydrake6855
@graydrake6855 8 ай бұрын
if intrq.tm2 is 1, even with inten.tm2 == 0, will it get to 0 again? or does the user have to set it back to 0? in that case, the code should clear that bit even with inten.tm2==0: if (intrq.tm2) { intrq.tm2=0; if (inten.tm2) { /* interrupt service code here */ } }
EEVblog #1141 - Padauk 3 CENT Micro - Programmer
19:42
EEVblog
Рет қаралды 69 М.
you need to stop using print debugging (do THIS instead)
7:07
Low Level Learning
Рет қаралды 433 М.
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 105 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 1,3 МЛН
The Cheapest Microcontroller? Getting started with the 10 cent Puya PY32.
21:36
3 Cent Microprocessor Teardown: Padauk PMS150
5:50
electronupdate
Рет қаралды 31 М.
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 607 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
WHAT IS SPI? | DIY SPI in 74 series logic!
31:17
OverKill Projects
Рет қаралды 2,4 М.
Just enough assembly to blow your mind
29:31
Kay Lack
Рет қаралды 40 М.
EEVblog #1144 - Padauk Programmer Reverse Engineering
15:14
EEVblog #1140 - 3 CENT Micro LED Blinky with ICE!
27:25
EEVblog
Рет қаралды 103 М.