Sometime ago, I developed the code for interactions with the humidity sensor DHT11. Also, I had used the same code in one of my projects and I was not particularly happy with reliability of this sensor. That’s why I decided to try DHT22 in case if I would use it in some future project.
Tag Archives: pic lab
Pic Lab, PIC18, Experiment #1, UART in PIC18
This was a time to switch to XC8 compiler, it was not hard at all, but appeared that using of UART in PIC18 series has some peculiarities.
At the moment of this article the XC8 compiler had libraries for work with a periphery in the folder /includes/plib. Now they got rid of it and experimenting with a different approach. Anyway the legacy support looks like quite a strong side for microchip. Well I used then usart.h library which now I regret I did.
Out tasks are:
- To write a single symbol
- To write a string
- To read 1 symbol = 1 byte
- To read a couple of bytes
I will be working with PIC18F14K50.
Continue readingPic Lab, PIC16, Experiment #7, The comparator module
Pic Lab, PIC16, Experiment #5: interruptions
Interruptions are one of the great things about microcontrollers, if you want to do something fast, reliable, and simple… well, not exactly simple in a programming language sense perhaps, but really simpler from the hardware perspective point of view. So, the main purpose of interruption is to interrupt your main program cycle and do whatever you want in case of that event (a timer has reached the settled time, a button has been pressed, and so on). Here is the picture from the mikroe ebook (www.mikroe.com), just because they really made quite nice pictures and quite a nice manual by the way.
Going further…
Continue reading