When I started to dig into USB topic it was quite a surprise, the amount of efforts the smart people around the world put into it just unbelievable. Even more fascinating fact – it actually worked out. The excitement reached some saturation when I realized the prices (: Vendor ID will cost you 5 grands per year, want to use a USB logo – no problem, just add another 6 grands on the top. Now we could test the compliance of your device with our standard for n grands… The companies using USB are listed on the website www.usb.org (USB Implementers Forum – USB-IF). The curious one could just count a number of companies and calculate the profit just from the year subscription, and this thing is going on for a long long time already. Well they have definitely built an addictive stuff. I, personally, have found the usage for my projects a bit excessive, I definitely not ready to put 5 grands per year for USB in the cheap humidity sensor.
Now, there are tons of different information, it is really challenging to grasp all at once, I will be honest and won’t pretend that I got everything, have a lot of holes in the knowledge, I just need to make it alive and respond to my commands. So, what I gonna to do is to show the info which looked important to me and then will conduct two experiments on this “foundation”.
I was working on my personal project – an audio amplifier and needed the LCD display functions, I had already described in my experiments the way to do so, but there were some flaws, so here we are again. What do we need?
There are tons of articles out there, but I decided to make my own device at the moment:
I had thoughts to make such a device long ago, but at this point of time, the necessity of having this stuff increased significantly. Initially, I found a cheap CP2102 IC, it was cheaper than the huge FT232RL, which has a lot of redundant for me functions. Then I went shopping (here I’m talking about Belarus like 8 years ago) and realized that for us CP2102 is more expensive than FT232RL. Well, my choice was kind of obvious.
Let’s look at USART module in pic microcontroller (uart module).
I’m going to move in two ways:
1. Using existing functions from a hi-tech compiler.
2. Writing my own functions.
USART = UART = SCI – the universal data transmitting/receiving protocol, which can work in synchronous and asynchronous modes. We pay attention to the second mode at the moment, this one is used for communications mostly.