PIC Microcontroller Programming - PIC AS Assembler using MPLAB X IDE, Blinking LED

Support What's a Creel? on Patreon: / whatsacreel
Office merch store: whats-a-creel-3.creator-sprin...
FaceBook: / whatsacreel
This video is a little crash course on how to program a PIC microcontroller. I am using the PIC AS assembler, which is the newer version of the Microchip Assembler, and I will be programming using a PIC 12F675, though you can probably follow along with other mid-range devices.
We will be using MPLABX, and demonstrating many of the features which are useful when programming and debugging PIC microcontrollers.
MPLabX IDE: www.microchip.com/en-us/devel...
12F675 Datasheet: ww1.microchip.com/downloads/e...
Microchip Mid-Range Reference manual: ww1.microchip.com/downloads/e...
Microchip Assembler User Guide: ww1.microchip.com/downloads/e...
Keep the above manuals handy whilst programming these devices! In addition to the above references, I recommend some great videos I have found on KZread. The following list are videos I recall watching and enjoying, so have a watch if you like:
For migrating from MPASM, I recommend you watch Pizzey's tutorial: • MPLAB-X IDE and XC8-AS...
For a lot of great info and demonstrations regarding assembly programming (they use MP ASM), I'd recommend the excellent channel 'Circuit Bread': / @circuitbread
Software used to make this vid:
Audacity: www.audacityteam.org/
Davinci Resolve 16: www.blackmagicdesign.com/prod...
OpenOffice: www.openoffice.org/
Gimp: www.gimp.org/

Пікірлер: 159

  • @danielfischer1362
    @danielfischer1362 Жыл бұрын

    Creel, you are a GOOD man!!!. Thank you very much for the Blink PIC tutorial! While by now, April 19, 2023, MPLAB X is v6.05, and I got some syntax errors, while using your code when compiling for a PIC12F629, you gave me enough info fix them, and to my amazement my little PIC is blinking the LED on the first try!!!!! I could not believe it!. Now, that I managed to go through this tutorial, I have to figure out why some code written 19 years ago no longer compiles under MPLAB X. I have a fighting chance due to you.... Thank you very much.

  • @jj74qformerlyjailbreak3
    @jj74qformerlyjailbreak39 ай бұрын

    I remember a couple years ago, a video like this would’ve been so boring to watch. Back then I didn’t comprehend anything related to Programing, and had to “Force Feed” this knowledge. 😂 Now I can listen along and visualize what’s going on in my head. Big difference, almost Night/Day. Your videos are easy to follow along with now. Thanks for all your time, it does pay off. God Bless.

  • @JayJay-ki4mi
    @JayJay-ki4mi3 сағат бұрын

    I'm using an 12F508. No banks, but was able to follow along perfectly fine. Nice one.

  • @thirstywatersfreeaudiobooks
    @thirstywatersfreeaudiobooks Жыл бұрын

    That was brilliant, thank you so much for putting this together! My first engineering job back in 2002 was as an embedded systems designer using a Microchip PIC as our microcontroller (I don't remember which family, maybe PIC16F). I got to write firmware, I even designed some of the PCBs we use. I was so excited when my first PCB arrived from the fab house! I mounted and soldered the components on with such pride, and the best part was it worked! Unfortunately, that job only lasted a little over a year, and I haven't touched any embedded systems since then. Something recently triggered the itch in me to get back into it as a hobby, so here I am some 20 years later trying to re-learn PIC assembly to build some fun little automation projects for around the house and camper. Thank you!!

  • @andyfarquhar9302
    @andyfarquhar9302 Жыл бұрын

    I have just written the same code for a PIC16F84A using XC8 (pic-as) v2.36 found it kept generating multiple syntax errors, starting at MOV32L instruction. After much frustration and web trawling and reviewing the tutorial 5x+, I ended up downgrading the compiler toolchain to XC8 (pic-as) v2.32, as used in tutorial. It built successfully to my suprise !! I am so happy, great tutorial. Thanks.

  • @wilbermunn9532

    @wilbermunn9532

    Жыл бұрын

    I'm writing code for 16F690 The ", F" on movwf in the macro seems to be the issue for me, when I moved back to v2.30 I was still having some warnings & errors on build in mplab v6.05 This version of the macro compiles with pic-as v2.41 for me MOVBIGL macro dest, imm32 movlw (imm32 >> 0) AND 0xff movwf dest+0 movlw (imm32 >> 8) AND 0xff movwf dest+1 movlw (imm32 >> 16) AND 0xff movwf dest+2 movlw (imm32 >> 24) AND 0xff movwf dest+3 ENDM

  • @Andrei424M
    @Andrei424M2 жыл бұрын

    I have been trying the first Blinky on a PIC16F628A about 6 years ago... and, yes, it was on a breadboard with a Green LED, and a tear of nostaiga falls off my eye. I did it in MPLAB IDE 8.92 (and only now I realise how old school it is). Now I am toying around with STM32 programming and, looking back at my memories I see how easy and fun PICs to program. Seeing this introduction video really made my day. Keep it up with the content.❤️

  • @_..---
    @_..---3 жыл бұрын

    "you need to get the datasheet", what an understatement

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    Maybe an understatement, but it needed to be said. :)

  • @MD-vs9ff
    @MD-vs9ff2 жыл бұрын

    Just a note, Watchdogs should NOT be resetting your chip frequently. The point of a watchdog, if used properly, is to reset the microcontroller if some bug causes it to get stuck in an infinite loop of become unresponsive somehow. In normal operation, you periodically reset the countdown so it doesn't reset you. But if you get caught in an infinite loop or your code gets derailed by a rogue pointer, the timer won't be reset so the micro gets reset once the countdown completes.

  • @q12x
    @q12x2 жыл бұрын

    Please, make more PIC's tutorials ! Make a mini-series with them. Also, explain more in depth the PIC memory blocks, the register file map, special function registers, etc.

  • @larsfinlay7325
    @larsfinlay7325 Жыл бұрын

    thank you for sharing your knowledge and being so enthusiastic in every video you make. I'm halfway through your assembly course just sort of peeking at this project now seeing how you set stuff up. thanks for teaching an old dog some new tricks.

  • @talideon
    @talideon2 жыл бұрын

    Another method is to lean on TMR0 to do the delay. It's a bit more advanced, but it's much less code, more accurate, and means the μC can be put to sleep for the duration, which is great for cutting down power usage.

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    Your comment alone has made reading the comments worthwhile. Mr. Total Newbie here wondered if the approach shown in the video was the best way to do this, and glad to hear there is an alternative. That said, I think for this video, the "sub-optimal" approach here was spot on; it avoids distraction & makes this video a better teaching tool IMO.

  • @dominykasc8634
    @dominykasc86342 жыл бұрын

    Thank you so much for this tutorial. I had a different PIC (PIC16F877A to be exact) but you had explained everything very clearly so, despite having no prior experience, with the help of a datasheet I was still able to make an LED blink.

  • @khatharrmalkavian3306
    @khatharrmalkavian33062 жыл бұрын

    Any Arduino can also be used as a programmer. The IDE can write the programmer program to the Arduino, then you wire up the victim on the breadboard and set the IDE to use the Arduino as a pass-through. (There are several guides online.) I've done this reliably with ATtiny chips and it's been a great (and cheap) solution.

  • @martinxXsuto
    @martinxXsuto2 жыл бұрын

    this took me back to microcontroller class Honestly, what limited programming we've seen i liked this the most

  • @piotrlenarczyk5803
    @piotrlenarczyk58032 жыл бұрын

    Thank you for video. The hardest thing is to start with new topic. This tutorial briefly introduces great world of MCU assembly;).

  • @sathyadines5036
    @sathyadines50362 жыл бұрын

    Nice i mostly use C but sometimes we need assemble code knowledge to know what happening in memory chip. Its refreshing to me. Good job!!!

  • @GiBBO5700
    @GiBBO57002 жыл бұрын

    PIC micros are my GOTO for most projects. A better starter is 16f. You still need to switch register banks but you can use the ICD (In Circuit Debug) with Pickit and MPLab. So good to be able to step code on the physical device. It makes debugging so much easier. Not disrespecting the 12f, I have used many 12f's and they are very cheap to boot. Also it was great to see you telling people to initialise the comparator and ADC registers. Many hours spent in the early days debugging only to realise the GPIO is being overtaken by internal modules. Great video! 👍

  • @TomStorey96
    @TomStorey963 жыл бұрын

    Two of my favorite things in one video - creel and PIC! I could be wrong, but I reckon it's "XG ecu" - with ecu referring to engine control unit. These guys seem to make a few vehicle related products. Great little programmer though, I have one and it can program a lot of different devices - MCUs, PLDs, ROMs etc. There is also an open source command line tool available for it (called "minipro") that's runs on Mac and Linux.

  • @TroySchrapel
    @TroySchrapel2 жыл бұрын

    Great work, mate. I'm about to use a PIC to add PS/2 keyboard support to my homebrew 6502-on-a-backplane build.

  • @locusf2
    @locusf23 жыл бұрын

    I can imagine how refreshing it must be to look at assembler that doesn't have 9 volumes of documentation for a change :)

  • @captainswing4040

    @captainswing4040

    2 жыл бұрын

    haha intel datasheets are bloody encyclopedia of the universe but they are very very detailed and i like really like that these guys put work into making good documentation

  • @locusf2

    @locusf2

    2 жыл бұрын

    @@captainswing4040 there quite a few videos online where they go through the developer reference and check out the generated bytecode vs the documentation, its really fun to look at

  • @chaoticgoodcoding3700
    @chaoticgoodcoding37003 жыл бұрын

    Woah! I was just thinking I should learn how to write assembly for my pic18f44k22. Awesome!!!

  • @schnozberry2
    @schnozberry22 жыл бұрын

    Great to see some more of your videos coming out. PIC assembly is where I started my programming journey. As great as Arduinos are they do tend to abstract too much of the low level goodness ASM away.

  • @TheUnofficialMaker
    @TheUnofficialMaker2 жыл бұрын

    great,i must try it.Hope you will do more in this series. PS: I DID IT!! Cool Beans!! Used PICkit 2 programmer, worked fine without the NOPs at the end.

  • @seamusdemora5598
    @seamusdemora55982 жыл бұрын

    The comment count stands at 99 as I write this, and so I am exceptionally motivated to submit Comment #100. But seriously: This was hugely informative and enlightening for me, so I would like to thank you for the time and effort you put into this. I'd also like to ask if there is anything we can do to encourage you to do more of these?

  • @aniellopierri8307
    @aniellopierri83072 жыл бұрын

    Well done! for a newbye it is great! Thanks.

  • @ms767210
    @ms7672102 жыл бұрын

    Great tutorial. The kind I could have used back in the early 2000's. It seemed like a big learning curve back then and it was hard to find anyone for advice that wasn't a smart arse at the same time. Stuck at it though and it was fun alright. Found you through your branchless programming vid. That was an interesting one.

  • @sukruciris
    @sukruciris3 жыл бұрын

    Hi Creel, I learned so much thing from your direct2d tutorials. I would be so happy if you make some xaudio2 (or a good sound library that we can use with direct2d) tutorial. Have a good day!

  • @davidconner-shover51
    @davidconner-shover51 Жыл бұрын

    For legibility, all the bit and byte labels used in the manual are in the .inc file for the device, simply invoking it at the start of your program will define them.

  • @dmaster20ify
    @dmaster20ify Жыл бұрын

    This is a good foundational video tutorial.

  • @JohnSmithZen
    @JohnSmithZen Жыл бұрын

    Great video for beginners!

  • @gathda
    @gathda3 жыл бұрын

    Great video.

  • @fifaham
    @fifaham2 ай бұрын

    Excellent video - thank you.

  • @CesarMartinez-eh1dc
    @CesarMartinez-eh1dc2 жыл бұрын

    Thank you. It was very didactic. The guy is an intelligent American.

  • @ScottSavageTechnoScavenger
    @ScottSavageTechnoScavenger2 жыл бұрын

    Your tutorial is greatly needed. Thank you for making it. because .... MPLAB is the ABSOLUTE WOSRT program I have ever used when it comes to installation. One would expect a development platform to have some sort of built-in options for which chip and which language you want to use and install all the needed components for you. But not MPLAB. MPLAB sends you on a lengthy tresure hunt without a map. How lazy of them.

  • @mytechnotalent
    @mytechnotalent2 жыл бұрын

    This is fantastic. Have you thought about a full detailed series on the PIC using this chip?

  • @ruffianeo3418

    @ruffianeo3418

    Жыл бұрын

    And yet, 4:3 is a much more suitable format, especially if you use IDEs (compared to simple editors).

  • @danilv.l.2501
    @danilv.l.25012 жыл бұрын

    Very interesting, thanks bro!

  • @robmicrochip3427
    @robmicrochip3427 Жыл бұрын

    Vielen Dank aus Deutschland, hat mir sehr geholfen👍

  • @therzook
    @therzook2 жыл бұрын

    I hated assembly in high school back then in 99, it was actually so bad that I have left electronics and changed my profession into electrical engineer, after 10 years got bored, somebody gave me few small plc projects, couple yrs on and another person gave me deadline to learn Ignition scada... I hit the roadblock called scripting same person said that I should grasp basics of python and Javascript within a week... after year or so I am back in learning assembly language, this time without terrible school and teachers... And yes I actually like it a lot. And yes using all those engineering skills and see them in action, implemented gives tonnes of satisfaction... same person said that they need project manager now... shit...

  • @guilherme6535
    @guilherme65353 жыл бұрын

    Nice video

  • @luiscarlosmarques3946
    @luiscarlosmarques39464 ай бұрын

    Essa é a aula de introdução mais rica e organizada que assisti. Desculpas, eu não sei escrever essas coisas em inglês. Gratidão.

  • @reirei_tk
    @reirei_tk3 жыл бұрын

    I guess I'm celebrating Christmas early this year.

  • @wafikiri_
    @wafikiri_ Жыл бұрын

    When you need to debug embedded assembly code, and you don't have a simulator for the assembler (as happened to me in 1986 with my first program in Modula II, in a project requiring assembly to control a machine), you can still print the microprocessor's registers with the following trick, in which, as an example, registers PC, A, B, X, and CR will be printed at different assembly-coded program locations. If _ASM( assembly code) is the format of the assembly-embedding instruction, insert the following fragment, adapted to your case, at various places in your embedded code: ) /* DEBUG * to print PC, A, B, X, and CR */ print

  • @robj3889
    @robj38893 жыл бұрын

    Rad video now I feel like I could actually take on a microcontroller like this at least for fun. Out of curiosity how much trial and error did you have to go through before you were able to produce this? Does this kinda thing just spring forth from a Creel or does it take some testing and preparation?

  • @adnansayder2148
    @adnansayder21482 жыл бұрын

    I began assembler of pic at 1995 but now ı dont use exactly but ım using as parts into c programs its very useful and important for memory use e.t.c

  • @Sendeyap_Ar-Ge
    @Sendeyap_Ar-Ge2 жыл бұрын

    Abone oldum. Çok değerli bilgiler veriyorsun. Başarılar dilerim.

  • @theexplosionist2019
    @theexplosionist20193 жыл бұрын

    Shenzen I/O, the game where you program microcontrollers, immediately springs to mind.

  • @sent4444

    @sent4444

    Жыл бұрын

    but you can only put like 10-20 instructions per controller

  • @vetriligamvetrilingamnadar7171
    @vetriligamvetrilingamnadar71714 ай бұрын

    Thanks 🎉🎉

  • @oqardZ
    @oqardZ3 жыл бұрын

    It would be great if you could show the same, but with a timer which triggers an interrupt which wakes the MCU to handle the interrupt. That would be a good technique to know because it gives you much smaller power consumption, i.e. longer battery life of your product.

  • @fredericmeyer8182
    @fredericmeyer8182 Жыл бұрын

    Hello, for avoiding to add `-presetVect=0` in linker option you can declare PSECT like this: PSECT resetVect, abs, class=CODE, delta=2 ORG 0 resetVect: The magic is permitted with the `abs` attribute in PSEC and also the directive `ORG 0` (or `ORG 0x0000`)

  • @rawlc.5086

    @rawlc.5086

    Жыл бұрын

    please, if you understand that "psect" new directive help me, (psect udata psect udatashr psect code ) in ram PSECT CODE PSECT class=CODE all those diferent ways are placing my instructions in completely arbitrary different parts of the program memory. some of them are in the first registers, some others in the middle and some others in the end, even when i write "code" this way, one part of my program goes to an "extra section program"... i don't understand anything... also PAGESEL ANSEL... i don't understand them, but i don't really care of it, i'd just like to know about PSECT to start programming. thanks if you can help me... i really don't like this new pic-as

  • @pup4301
    @pup43013 жыл бұрын

    Just finished programming a pic12f1612 to turn on a pin ising the triscabits. This comes up and now I don't want to sleep.

  • @surman1816
    @surman18163 жыл бұрын

    top stuff

  • @David_11111
    @David_111112 жыл бұрын

    yay

  • @c4ashley
    @c4ashley2 жыл бұрын

    I love assembling for PIC, but I also absolutely hate it, because information is so scarce. It seems very few people are doing it with pic-as so it's hard to find relevant forum posts, etc. The Assembler Guide and the Migration Guide are great, but also.... sometimes not so great. Also the build errors are so often just completely useless! Thank you for spreading knowledge.

  • @UnworthyUnbeliever

    @UnworthyUnbeliever

    2 жыл бұрын

    books i'm trying to read teach MPASM. even after applying MPASM to PIC-AS migration, i still get cryptic error messages. running a working Simulator in MPLAB X is a pain in comparison to MPSIM. man Microchip . . .

  • @sanduntharaka8081
    @sanduntharaka80812 жыл бұрын

    Super 😍😍

  • @j1952d
    @j1952d3 жыл бұрын

    The mnemonic TRIS is a bit cryptic. I'm going back over 30 years (since I messed with PICs), but I seem to remember it's short for TRISTATE. Don't think you mentioned it, but apologies if I missed it.

  • @WhatsACreel

    @WhatsACreel

    3 жыл бұрын

    I'm not sure if I did mention it? Well thanks for the info anywho, and cheers for watching :)

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    I also had wondered about TRIS - until I saw this. Yes, he did mention it.

  • @juanfra1997
    @juanfra19972 жыл бұрын

    maybe a course when you teach how to write libraries to modules on xc8 in mplab suing mcc would be so helpfull and newer chips that are used by students for example pic 16f18875 thanks for the video

  • @_crazytechz
    @_crazytechz2 жыл бұрын

    Nice nice

  • @JimTheScientist
    @JimTheScientist3 жыл бұрын

    epic

  • @matthewe3813
    @matthewe38132 жыл бұрын

    please continue the neural networks series

  • @LivingTheDream77
    @LivingTheDream772 жыл бұрын

    What do you think about the new intel AMX instruction set extension ?

  • @alnoorratansi9364
    @alnoorratansi93642 жыл бұрын

    Hi can you a video on installing the pic as complier, or post the link for downloading the compiler

  • @GrinyaPLAY
    @GrinyaPLAY3 жыл бұрын

    Thanks. What you think about making modern asm coding series next time? Can you create simple game or implement useful algorithm with asm? Another great topic is using asm today with proper dev pipeline and patterns.

  • @WhatsACreel

    @WhatsACreel

    3 жыл бұрын

    I'd love to do some more ASM vids. Cover larger projects, hopefully we can get something more significant rolling in the future. Although, they will mostly be high level, just with the matrix routines or processing or whatever in ASM. Anyway, thanks for the suggestion mate, and cheers for watching :)

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    @@randallyoung9411 That was weird (in a bad way) - The video began normally enough, but when the video changed to an inset, the sound was lost. Does this guy have a problem with the mechanics of making KZread videos? No insult intended - it was just weird that he's never bothered to fix this.

  • @cosma_one
    @cosma_one3 жыл бұрын

    So if you used C, I guess you wouldn't need to create a macro for moving 32bit values to vars and for the delay code you could call an internal function like "delay_ms", like in AVR MCUs. Right?

  • @ernieh5664
    @ernieh56642 жыл бұрын

    Hi, i downloaded mplab x ide v5.50, but regards the assembler, it wanted to sign me up 4 a 60 day trial when i downloaded v2.32, would an earlier version be ok for using the pic12f675 projects. Thanks Ernie

  • @pabloonepack8662
    @pabloonepack86628 ай бұрын

    Hello, I have a question, when I program the pic and leave the output-only bit (bit3) it does not act as such, I have done it with other microcontrollers and if it works, my intention is to use bit 3 with a boo?

  • @natureworld295
    @natureworld2953 жыл бұрын

    I'm using a PIC 16F877A , is the process similar ?

  • @Good.Morning.YouTube
    @Good.Morning.YouTube Жыл бұрын

    👍🏻👍🏻👍🏻👍🏻👍🏻❤

  • @sanusitunde8266
    @sanusitunde82662 жыл бұрын

    Now i can see a real programer. Not a configurer. Thanks for awaken ou best assembler the language of computer.

  • @davidallen9987
    @davidallen99872 жыл бұрын

    Is it possible to get a copy of the code? I bought a new development system and I am having a had time getting and traction.

  • @chrisharper2658
    @chrisharper2658 Жыл бұрын

    What is the better architecture, those little PIC chips or the ATtinys? I know the tinys are fully supported with open source cross compilers.

  • @TomStorey96

    @TomStorey96

    10 ай бұрын

    The best one is the one that gets the job done. 🙂 In all honesty, just pick one and get started. They'll both do certain jobs as equally as well as each other. Once you hit a situation where you need something else, you'll know. And at that point you'll probably have a better idea of what you need. There are some open source tools for PIC as well, such as gpasm.

  • @Scavage0001
    @Scavage00012 жыл бұрын

    31:10, how did you do this Step thing? is there some keyboard action going on? please tell how to single step

  • @TheUnofficialMaker

    @TheUnofficialMaker

    2 жыл бұрын

    set a break point, use F7 to step

  • @samzx81
    @samzx813 жыл бұрын

    Nice to see some real programming. Not like that python garbage! haha. Also nice mic (I say this because I have the same one. I got it because it looked cool LOL.)

  • @samzx81

    @samzx81

    2 жыл бұрын

    @@motbus3 js does really suck 🤣

  • @JoshuaJapitan

    @JoshuaJapitan

    2 жыл бұрын

    What mic is that by the way

  • @samzx81

    @samzx81

    2 жыл бұрын

    @@JoshuaJapitan um I think it's a Samson meteor mic.

  • @RedGuardYF

    @RedGuardYF

    Жыл бұрын

    There are many programming languages that deserve to be shat on but Python isn't one of them.

  • @samzx81

    @samzx81

    Жыл бұрын

    @@RedGuardYF well firstly my comment was meant to be slightly jokey I don't really hate python (its not PHP 😅.) But secondly I think while there are lots of good things about it, python also has problems. One obvious one is the use of indentation to define scope. It can lead to a lot of errors that are hard to fix if something happens to the indentation and although it means slightly less typing I don't think it's worth it. Another problem is the lock that the interpreter uses that makes it hard to scale across many threads.

  • @lerssilarsson6414
    @lerssilarsson64143 жыл бұрын

    P. J. Plauger wrote 20+ years ago about switching from assembly language to C code - even in 8-bit microcontroller development.

  • @lerssilarsson6414

    @lerssilarsson6414

    2 жыл бұрын

    @justan idiot C provides a higher abstraction level. Mr. Plauger wrote from the perspective of a developer's productivity.

  • @haraldkrieger6562
    @haraldkrieger6562 Жыл бұрын

    9:26 if you cant see the window open the window. Seems plausible 😅

  • @ady7d77
    @ady7d77 Жыл бұрын

    What course to learn xc8 language?

  • @wynand988
    @wynand9882 жыл бұрын

    Hey man this has helped a lot with my pic16 but i cant seem to get a pic18 working, it compiles fine but the debugger jumps around irrationally and when adding a retfie it just loops between that and the psect, any advice?

  • @wynand988

    @wynand988

    2 жыл бұрын

    ok so i just figured it out, the problem was the delta=2 phrases at the start. with them removed the pic18 works

  • @advancedinkscape8494
    @advancedinkscape84944 ай бұрын

    Wow, what a bizarre assembler! Having to specify custom linker options of -presetVec=0 on every single standard program, which, in every other assembler in the history of the universe starts at 0 by default (including mpasm), That's plain insanity, and even after doing more than a dozen of pic-as programs, I still have to figure out each time what the magic incantation is. It blew me away when pressing the button to send my hex file to the PIC, that it implied the programmer only programmed the config bits until I added that little bit of nonsense.

  • @paradiselost9946

    @paradiselost9946

    2 ай бұрын

    its as if microchip hates their products, and their clientele? magic incantation... i think its worse than that, its a complete ritual... wear the proper hat at the right angle with the correct robes and spin round three times CCW... what i just saw of "pic-as" is enough... stick with whatever it is im running. now theyve demanded one have their boots polished with pig fat three weeks prior to performing said rituals, and ensuring that the front gate is locked on june 13th... bad enough simply coming to terms with ASM, plugging things in, and sifting through drop downs, to dick around with that nonsense!

  • @josephchamness9915
    @josephchamness99152 жыл бұрын

    On ubuntu I do not seem to have the option for pic-as at: 8:07 But when I searched I could not fined any instructions for getting the assembler and it seems like if should of come with the IDE?

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    If I'm not mistaken, the assembler comes with xc8 (the compiler). He does make a point of this in the video. I was pleasantly surprised that it was included in my recent download of the "free" xc8.

  • @fridtjof685
    @fridtjof6852 жыл бұрын

    You incerement all your registers (DELAY0-3), as compensation for the decfsz method skiping one count (as I understood). But isn't this ignorig the possiblitiy for a 255 in one of the regs, and if say Delay1 would be 27, would decfsz DELAY0, F not skip 27 times. Did I missunderstand why you used incf.

  • @mohandmohand2047
    @mohandmohand2047 Жыл бұрын

    How can programmer 12c508/p???? Use any programmer or what

  • @nightly_builds
    @nightly_builds Жыл бұрын

    @ 24:46 I had to remove the F in v6.00 on linux to get is working... does anyone know more about this?

  • @nightly_builds

    @nightly_builds

    Жыл бұрын

    Cool video btw ;)

  • @muratemredemircioglu2897
    @muratemredemircioglu28977 ай бұрын

    @29:16 i get an error: "main.asm:23:: error: (876) syntax error" i am 100% sure i did exactly the same thing as you did. MPLAB version 6.15

  • @LewisLoflin
    @LewisLoflin3 жыл бұрын

    Trouble most people have little interest in real programming. Good job.

  • @hbibamrani9890
    @hbibamrani98902 жыл бұрын

    Please show us a fast way to bit rotate a huge number or a file; please!!

  • @giangem37
    @giangem372 жыл бұрын

    I was used too much projects with 12F675, most of them for control solar charge, this cheap mcu can do much things instead another more expansive like atmega or arm, no need to build pcb with osc, bootloader, only this mcu and do anythings. they dont know what they do and just think this old pic are worst and use some another expensive mcu and can't use full.

  • @alexanderohman1707
    @alexanderohman17078 ай бұрын

    Following along in MPLAB X v6.15 i get syntax errors on "clrf GPIO, F" and "MOV32L DELAY0,33333" and google doesn't seem to be my friend. Anyone able to give me a hint as to what I'm doing wrong?

  • @miked4122

    @miked4122

    7 ай бұрын

    "clrf GPIO,F" should now be "clrf GPIO". It's a similar issue with the second error. In the macro definition "movwf dest+0,f" should just be "movwf dest+0". (And the same for the other 3 similar statements in the macro.

  • @ceptimus

    @ceptimus

    5 ай бұрын

    For some instructions, you can replace the , F or , W with , 1 or , 0. However, CLRF and MOVWF don't have the second parameter, so them being present in the video was a mistake. For those instructions that do support a second parameter, one option writes the result back to the file register, and the other to the W register. Look at the PIC12 datasheet section on "instruction set summary" for details. I suspect the older assembler had F and W as pseudonyms for 1 and 0, I',m not sure if that still works on the newer versions, because I use ,0 and ,1 anyway. Usually you can omit the parameter and the assembler defaults to using the mostly-sensible (and most used) default. Sometimes you want to use the not-obviously-sensible option: for example, MOVF foo ,1 reads the contents of the foo register and writes them back to the same register! W is not affected! This can be useful sometimes, because it still tests the contents for zero, and sets or clears the status Z flag.

  • @ZedaZ80
    @ZedaZ802 жыл бұрын

    Holy heck, these cost less than 1USD :0 *EDIT:* I am looking at a newer model, this particular one costs more, presumably because they don't want to make more if they don't have to :P

  • @talideon

    @talideon

    2 жыл бұрын

    Yep! They want to discourage the use of older silicon, but not for any nefarious reasons: it just means they have fewer variants to have to deal with.

  • @padoelec
    @padoelec2 жыл бұрын

    PSECT IS VER DIFFIFULT WHY START ADDRESS NOT FIX

  • @martinziskind3971
    @martinziskind39712 жыл бұрын

    I'm getting a "BlinkLED.S:56:: error: (876) syntax error" on the MOV32L DELAY0, 333333 line, can someone please help me?

  • @martinziskind3971

    @martinziskind3971

    2 жыл бұрын

    This is my first MACRO ever. I did save the file as BlinkLED.S. It was .ASM. No difference

  • @martinziskind3971

    @martinziskind3971

    2 жыл бұрын

    I found the problem. In the Macro, you had MOVWF dest+x, F. The ,F was not allowed and caused the Syntax error

  • @DB-xx6ec

    @DB-xx6ec

    2 жыл бұрын

    @@martinziskind3971 Thank you! this is also the case for a lot of other parts in this video where F is used at the end when it does not need to be.

  • @tjaartkotze4394

    @tjaartkotze4394

    Жыл бұрын

    @@martinziskind3971 same here, MPLAB ide v6. Thanks for the solution. Still a great vid Creel thanks to u2

  • @ady7d77
    @ady7d77 Жыл бұрын

    Assembly language 64 bit or 32?.

  • @sent4444

    @sent4444

    Жыл бұрын

    8 bit

  • @AspartameBoy
    @AspartameBoy7 ай бұрын

    Very odd to put main inside your reset vectors🤣

  • @qsdrfghgujfddyffguff
    @qsdrfghgujfddyffguff2 жыл бұрын

    little pic but large code

  • @drstrangelove09
    @drstrangelove092 жыл бұрын

    "dec" -> dec as in deck (not deek)

  • @ZedaZ80

    @ZedaZ80

    2 жыл бұрын

    It depends on if you pronounce it "deck-reh-ment" or "dee-creh-ment." The former would become "deck" and the latter would be "deek." My original dialect of English uses the latter, but my current dialect uses the former, so I call it "deck" but used to call it "deek" when I was a baby programmer :P

  • @drstrangelove09

    @drstrangelove09

    2 жыл бұрын

    @@ZedaZ80 it's deck-reh-ment

  • @stok3si3

    @stok3si3

    2 жыл бұрын

    @@drstrangelove09 Accents exist. New Zealanders would pronounce this "deek", for example.

  • @drstrangelove09

    @drstrangelove09

    2 жыл бұрын

    @@stok3si3 of course accents happen

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    As an American living in Scotland, I've learned that translation from English to English is necessary for communication. The first trick is learning that it's the same word - but the accent is on another syllable.

  • @ruffianeo3418
    @ruffianeo3418 Жыл бұрын

    This video is a good example, why 16:9 is a terrible screen format for programming. He just has like 10 lines of code visible at a time :) But as long as you guys buy 16:9 monitors, this won't change.

  • @WhatsACreel

    @WhatsACreel

    Жыл бұрын

    I zoom the text in so it's large like that. By default there's a lot more on the screen.

  • @edwardzdankiewicz9068
    @edwardzdankiewicz906811 ай бұрын

    The first program was not hello world. It was blinky light. Sad to see little endian for the 32 macro..

  • @Billy-No-Mates-ol8nx
    @Billy-No-Mates-ol8nx3 ай бұрын

    In the 21st century, with efficient optimising compilers and high clock speeds, why muck about with assembler? Difficult to read, write and maintain!

  • @paradiselost9946

    @paradiselost9946

    2 ай бұрын

    reverse engineering. redundancy. my biggest kick is running back through hex dumps of code compiled, see how its actually stored on the device. only one step away with opcodes from the raw data. try and figure out whats going on without documentation. can see ways to improve code, tighten it up. etch off a chip cap and theres no documentation. work out a program simply by the "fuses burnt". cant do that in higher level languages. engineers working on that 70 yr old voyager "asm" language are getting paid well... dead and buried yet still kicking... asm may seem clunky but imho, its nice to know how half and full bit adders work, what a shift register does, even the seemingly simple task of division or subtraction in binary can lead to a rabbit hole... higher level languages obscure things. sometimes theres no need for a chip with all the bells and whistles. sometimes theres the satisfaction of figuring out how to do something seemingly never attempted before...

  • @stevenbliss989
    @stevenbliss989Ай бұрын

    I like and use several PIC uCUs, but I will NEVER FORGIVE and UTTERLY DESPISE that uCU like the PIC12F675 that does NOT use the MAX clock internally - NOT FORGIVENESS (especially for 8 pin devices like 675/683 etc.- EVIL EVIUL EVIL!!!!!!!!!!!!!!!!!!!!!

  • @amzonfire6013
    @amzonfire60132 жыл бұрын

    Why does the narrator has to show his face... it's annoying and an eye sore in the tutorial.

  • @jeremiahblum7833

    @jeremiahblum7833

    2 жыл бұрын

    I disagree 🙂

  • @amzonfire6013

    @amzonfire6013

    2 жыл бұрын

    @@jeremiahblum7833 I stand by what I said!!!

  • @seamusdemora5598

    @seamusdemora5598

    2 жыл бұрын

    @@amzonfire6013 As you wish, but please go stand over there. Yes - about 130 miles should do it.

  • @TheUnofficialMaker

    @TheUnofficialMaker

    2 жыл бұрын

    It makes it more personal, but could be smaller not to cover work area.