Tag archives for USART
RS232 serial communication is one of the oldest communication where data is sent or received one bit at a time. This protocol can easily be used to communicate between a PC and various devices supporting this type of protocol like PIC microcontrollers, GPS, GSM modem etc. While other interfaces like Ethernet, FireWire, and USB all send data as a serial stream, the term "serial port" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device. The Universal Asynchronous Receiver/Transmitter (UART) controller is the key component of the serial communications between a device and a PC or between devices. UART is also a common integrated feature in most microcontrollers today which is useful for communicating serial data (text, numbers, etc.) to your PC. In this article we're going to learn how to use the RS232 communication with MPLAB XC8 Compiler using the PIC18F Peripheral Library and MPLAB Code Configurator.
RS232 serial communication is one of the oldest communication where data is sent or received one bit at a time. This protocol can easily be used to communicate between a PC and various devices supporting this type of protocol like PIC microcontrollers, GPS, GSM modem etc. While other interfaces like Ethernet, FireWire, and USB all send data as a serial stream, the term "serial port" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device. MikroC Pro for PIC
Real Time Clock and Calendar functions are very important in many projects especially in data logging devices where a real time stamp is required in each record. This clock uses Timer 1 to implement software real time and clock functions. A Real Time clock (Digital Clock) can be made easily by using Timer 1 of a PIC Microcontroller. The Timer1 module exists in most of the series of PIC, this module can be used to easily implement a real-time clock. Instead of an external real-time clock device like a DS1307, an inexpensive 32.768 kHz watch crystal and two 33 pF capacitors are used to complete the circuit. In this application, Timer 1 is clocked by an external crystal (32.768 kHz) connected across RC0 (T1OSO) and RC1 (T1OSI).
The MPLAB® Code Configurator (MCC) is a user friendly Graphical User Interface (GUI) plug-in tool for MPLAB® X IDE which generates easy to understand C code that is inserted into an MPLAB® X project, based on the settings peripherals configurations and selections made in the Graphical User Interface (GUI). The generated code can be used in any application program. When starting out with a new project using Microchip 8-bit microcontrollers, setup of the configuration and all the peripherals can be time consuming, especially for new projects. The MPLAB® Code Configurator simplifies this down to a series of simple graphical selections from the menus within the MCC.
A Graphical User Interface is a man-machine interface device, in which objects to handle are drawn as icons on the screen, so the user can send controls by by a pointing device, usually a mouse or a keyboard. It is always easy and require less skills to operate a device from a visual representations of the workspace (GUI) by simply clicking a mouse or using a keyboard rather than a command line. In this article we are going to design a Graphical User Interface using Microsoft Visual C#. This software could be installed in any computer running windows operating systems. The computer will connect to the microcontroller using an RS232 serial cable. The PIC microcontroller will receive commands from the computer to control devices connected to it such as motors, LEDs etc.
An SD Card can be used to log data continuously over time for various purposes, this project shows the design of a temperature data logger with menu control system. The ambient temperature is read every minute and stored in a file on an SD card. When the program starts, the user is given three options: Saving the temperature readings to a new file on an SD card, Appending the temperature readings to an existing file or Sending all the saved file contents to a PC The user will have to choose one option and then press enter to start logging data. This menu only accessible once when the program starts, if the user wants to choose another option, he/she has to restart the program by pressing the reset button.