Nearly all microcontroller-based systems perform more than one activity. For example, a temperature monitoring system is made up of three tasks that normally repeat after a short delay, namely: • Task 1 Reads the temperature • Task 2 Formats the temperature • Task 3 Displays the temperature More complex systems may have many complex tasks. […]
Continue reading…
Posts by Farahat
Advanced PIC18 Projects—CAN Bus Projects:mikroC CAN Functions
mikroC CAN Functions The mikroC language provides two libraries for CAN bus applications: the library for PIC microcontrollers with built-in CAN modules and the library based on using a SPI bus for PIC microcontrollers having no built-in CAN modules. In this section we will discuss only the library functions available for PIC microcontrollers with built-in […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects:PIC Microcontroller CAN Interface
PIC Microcontroller CAN Interface In general, any type of PIC microcontroller can be used in CAN bus–based projects, but some PIC microcontrollers (e.g., PIC18F258) have built-in CAN modules, which can simplify the design of CAN bus–based systems. Microcontrollers with no built-in CAN modules can also be used in CAN bus applications, but additional hardware and […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects:Nominal Bit Timing
Nominal Bit Timing The CAN bus nominal bit rate is defined as the number of bits transmitted every second without resynchronization. The inverse of the nominal bit rate is the nominal bit time. All devices on the CAN bus must use the same bit rate, even though each device can have its own different clock […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects:Types of Errors
Types of Errors The CAN bus identifies five types of errors: • Bit error • CRC error • Form error • ACK error • Stuffing error Bit errors are detected when the output level and the data level on the bus do not match. Both transmit and receive units can detect bit errors. CRC errors […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects:Overload Frame And Bit Stuffing
Overload Frame The overload frame is used by the receiving unit to indicate that it is not yet ready to receive frames. This frame consists of an overload flag and an overload delimiter. The overload flag consists of 6 dominant bits and has the same structure as the active error flag of the error frame. […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects:Remote Frame
Remote Frame The remote frame is used by the receiving unit to request transmission of a message from the transmitting unit. It consists of six fields (see Figure 9.10): start of frame, arbitration field, control field, CRC field, ACK field, and end of frame field. A remote frame is the same as a data frame […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects:Data Frame
Data Frame The data frame is in two formats: standard (having an 11-bit ID) and extended (having a 29-bit ID). The data frame is used by the transmitting device to send data to the receiving device, and the data frame is the most important frame handled by the user. Figure 9.7 shows the data frame’s […]
Continue reading…
Advanced PIC18 Projects—CAN Bus Projects
The Controller Area Network (CAN) is a serial bus communications protocol developed by Bosch (an electrical equipment manufacturer in Germany) in the early 1980s. Thereafter, CAN was standardized as ISO-11898 and ISO-11519, establishing itself as the standard protocol for in-vehicle networking in the auto industry. In the early days of the automotive industry, localized stand-alone […]
Continue reading…
Advanced PIC18 Projects—USB Bus Projects:USB-Based Ambient Pressure Display on the PC
PROJECT 8.3—USB-Based Ambient Pressure Display on the PC In this project, an ambient atmospheric pressure sensor is connected to a PIC18F4550 microcontroller, and the measured pressure is sent and displayed on a PC every second using a USB link. An MPX4115A-type pressure sensor is used in this project. This sensor generates an analog voltage proportional […]
Continue reading…