📜 ⬆️ ⬇️

"Heart" of an electronic device based on Silicon Labs C8051F320

It happens that you need to quickly develop some kind of electronic device to control any units or to collect any information from these units. For this task, either any ready-made devices like the Arduino or a piece of hardware developed on the basis of a microcontroller are ideal. In this article, I decided to consider a small homemade board, which will be the heart of any such device.



The photo shows the resulting device (left) connected to the programmer (right)

So, to create a similar piece of hardware, we need a Silicon Labs C8051F320 microcontroller , several SMD resistors and capacitors, a USB cable with a type A connector, a soldering iron and straight arms.
')
Let's start with the description of the microcontroller. This MC incorporates a USB controller that allows you to connect it to a PC, and also power the circuit from USB if the total consumption does not exceed 400mA, a 10-bit ADC, about 20 I / O ports, a built-in clock generator, and a built-in debugger which makes it easier to debug the firmware. MK has an SMD form factor, the conditional image is shown in the figure:



In order to work with the MK, it is necessary to hang it on the board with the necessary elements, connect the power and bring the legs of the I / O ports to the outside of the device. Let's do it this way:



J1 connector - USB type A connector. Jumper JP3 switches device power from USB to an external source connected via JP4. For the USB power supply, the JP3 jumper must be closed, for the power supply from an external source - open, short circuit JP4. Button SW1 performs a "reset" of the device, i.e. restarts the firmware.
JP2 connector - a programmer connector, through it carries out firmware and debug firmware MK. I / O ports from P0 to P2 are brought out through two connectors JP5 and JP1.

The list of elements used for the scheme:



So, all this must be placed on the printed circuit board. Since all elements are on the SMD board, we will place them on both sides of the board, to save space. Alas, the wiring itself was lost, but this is not a problem, since it can be diluted in different ways. That's what happened in my case.

Conditional image of the board:



As you can see from the image, the scarf turned out to be rather small, which is very convenient - I plugged into the USB port and everything, you can work. For convenience, instead of a static USB port soldered to the board, a USB cable was used, cut off from the B side and soldered instead of the connector.

Reverse side of the board:



Front side of the board:



I apologize that the USB cable is a bit torn off in the photo, the board got out of the box after a month of lying.

It turned out a good working piece of iron, with which you can steer some remote devices from a computer, measure some parameters using the built-in ADC and much more.

Source: https://habr.com/ru/post/132295/


All Articles