There is something I forgot to mention in the video. Some of the older microcontrollers don't have "LAT" registers, like the famous PIC16F877(A). The idea of a separate "LAT" register was conceived later on. Those microcontrollers directly write to their "PORT" registers to change their outputs, hence the confusion of whether to read from or write to the "PORT" or "LAT" registers I mentioned in 11:58 .
@shimmeringtrashpile9 ай бұрын
This is a frickin awesome. Thank you. Also, thanks for your comment about LAT or PORT confusion.
@Microesque9 ай бұрын
Thanks 👍
@proxy75473 ай бұрын
you are the best !
@Microesque3 ай бұрын
Thanks 👍
@subhm17472 жыл бұрын
Crystal clear explaination!
@icarossavvides26416 ай бұрын
Very interesting, at about 15:45, you mention maximum source and sink currents, whilst the user needs to take notice of these limits they must also take in to account the maximum chip dissipation i.e. don't expect to be able to source or sink the maximum current through all the IO pins at the same time.
@Microesque6 ай бұрын
Of course. I was just trying to keep it simple since most of them rarely matter 👍 There are a bunch of limiting factors, and which ever one is the most limiting will apply. Max instantaneous current, max continuous current, max port current, max device current, max temperature, max power dissipation etc... Also, these are absolute maximum values. Ideally, you should never get close to these.
@anithasshenoy66625 ай бұрын
I have not seen registers explained in a more simpler manner. I have trying to understand these , but found too much of undigestable jargon. Tris registers -> PIN as INPUT or OUTPUT Lat registers -> PIN as HIGH or LOW Port registers -> READS PIN HIGH or LOW ANSEL registers -> PIN as ANALOG or DIGITAL WPU -> Enable / Disable INTERNAL PU-UP Resistors How simple to understand!! Great job. Thank you.
@Microesque5 ай бұрын
Glad you found it useful 👍
@maheshlokhande.3080 Жыл бұрын
great explanation sir!...hats off!
@2koenusz2 жыл бұрын
very nice and clear explanations
@youssefghriss17262 жыл бұрын
perfect timing man thank you
@Codem750 Жыл бұрын
A very good video, thanks
@BigA12 жыл бұрын
Another brilliant video. I was trying to find the syntax for writing to the OSCCON register and there it was. Could you let us know which Microchip document has the XC Compiler language definition.
@Microesque2 жыл бұрын
Everything you need to know about XC8 compiler will be in the "XC8 Compiler User's Guide". XC8 is a compiler that uses C language, it doesn't have a language of its own. But if you're talking about things like "OSCCONbits..." those are called "bit fields" (which is still C language). Check the section 5.3.6 in the XC8 User's guide: ww1.microchip.com/downloads/en/devicedoc/50002053g.pdf If you still don't understand, Google "Bit fields in C".
@michapoterek2034 Жыл бұрын
Cool!
@sayyidsahal19962 жыл бұрын
👍👍
@OviMG7 ай бұрын
Ok, but the question is, does the led turn on when bit is 1 or bit is 0? TRISE = 0b11111110; LATE = 0b00000001; because from this code the led (coresponding to the last bit) is turning OFF, while you said "1" is for turning the led ON
@Microesque7 ай бұрын
When the LAT bit is 1, the pin connects to positive rail; if the LAT bit is 0, the pin connects to ground, that's all LAT bit does. If the cathode (-) pin of your led is connected to the microcontroller and the resistor connected to the positive rail, the LED will turn on when the LAT bit is 0.
@OviMG7 ай бұрын
@@Microesque Thank you so much! Now, it makes sense!
@Microesque7 ай бұрын
@@OviMG np 👍
@utkugulgec5508 Жыл бұрын
Hey, where are you from? Your accent really resembles to a native Turkish.
@Microesque Жыл бұрын
Indeed, I'm from Turkey, but I think you already know that. 😅 I'd be very impressed if you could discern where I'm from through my accent.
@utkugulgec5508 Жыл бұрын
@@Microesque well I can't say I can pick that up :/
@rajashekharvarad3554 Жыл бұрын
Ultimate... Explanation.... Impressed lot. Please share ur email id if possible