Professional Documents
Culture Documents
INTRODUCTION
INTRODUCTION
SYNOPSIS
The principal focus of our project falls on CAN (Controller Area Network). CAN
is one of the elevating serial communication protocol which efficiently supports
distributed real time control with a very level of security.
For the efficient operation of this system, it requires CAN controller and CAN
transceiver. The software language like ‘C’ plays a splendid role in the proposed to ensure
the better possibility to provide a quality output with good accuracy.
CAN (Controller area network), the leading network in power train, body
electronic applications, industrial applications, and even in medical applications. The
data, which is impressed on the CAN bus, is made to run between the CAN modules. But
there is no guarantee to give an assurance whether t data is transmitted continuously
across the CAN bus without error or not.
2.2 PROPOSED SYSTEM
proposed system is mainly designed transmit the data continuously without error
and to display it on the nodes. The identifier of the module, the frame type and the data
are displayed on the system. These tool makers the engineers to reliable about the data
transfer, which are displayed on the nodes.
1 INTRODUCTION
The Controller Area Network (CAN) is a serial communications protocol which
efficiently supports distributed realtime control with a very high level of security.
Its domain of application ranges from high speed networks to low cost multiplex wiring.
In automotive electronics, engine control units, sensors, anti-skid-systems, etc. are
connected using CAN with bitrates up to 1 Mbit/s. At the same time it is cost effective to
build into vehicle body electronics, e.g. lamp clusters, electric windows etc. to replace the
wiring harness otherwise required.
The intention of this specification is to achieve compatibility between any two
CAN implementations. Compatibility, however, has different aspects regarding e.g.
electrical features and the interpretation of data to be transferred. To achieve design
transparency and implementation flexibility CAN has been subdivided into different
layers.
The object layer and the transfer layer comprise all services and functions of the data link
layer defined by the ISO/OSI model. The scope of the object layer includes
• finding which messages are to be transmitted
• deciding which messages received by the transfer layer are actually to be used,
• providing an interface to the application layer related hardware.
There is much freedom in defining object handling. The scope of the transfer layer
mainly is the transfer protocol, i.e. controlling the framing, performing arbitration, error
checking, error signalling and fault confinement. Within the transfer layer it is decided
whether the bus is free for starting a new transmission or whether a reception is just
starting. Also some general features of the bit timing are regarded as part of the transfer
layer. It is in the nature of the transfer layer that there is no freedom for modifications.
The scope of the physical layer is the actual transfer of the bits between the different
nodes with respect to all electrical properties. Within one network the physical layer,
ofcourse, has to be the same for all nodes. There may be, however, much freedom in
selecting a physical layer.
The scope of this specification is to define the transfer layer and the consequences of the
CAN protocol on the surrounding layers.
2 CAN OVERVIEW
CAN has the following properties
• prioritization of messages
• guarantee of latency times
• configuration flexibility
• multicast reception with time synchronization
• system wide data consistency
• multimaster
• error detection and signalling
• automatic retransmission of corrupted messages as soon as the bus is idle again
• distinction between temporary errors and permanent failures of nodes and
autonomous switching off of defect nodes
Application Layer
Object Layer
- Message Filtering
- Message and Status Handling
Transfer Layer
- Fault Confinement
- Error Detection and Signalling
- Message Validation
- Acknowledgment
- Arbitration
- Message Framing
- Transfer Rate and Timing
Physical Layer
- Signal Level and Bit Representation
- Transmission Medium
• The Physical Layer defines how signals are actually transmitted. Within this
specification the physical layer is not defined so as to allow transmission medium
and signal level implementations to be optimized for their application.
• The Transfer Layer represents the kernel of the CAN protocol. It presents
messages received to the object layer and accepts messages to be transmitted
from the object layer. The transfer layer is responsible for bit timing and
synchronization, message framing, arbitration, acknowledgment, error detection and
signalling, and fault confinement.
• The Object Layer is concerned with message filtering as well as status and
message handling.
The scope of this specification is to define the transfer layer and the consequences of the
CAN protocol on the surrounding layers.
Bit rate
The speed of CAN may be different in different systems. However, in a given system the
bitrate is uniform and fixed.
Priorities
The IDENTIFIER defines a static message priority during bus access.
Remote Data Request
By sending a REMOTE FRAME a node requiring data may request another node to send
the corresponding DATA FRAME. The DATA FRAME and the corresponding REMOTE
FRAME are named by the same IDENTIFIER.
Multimaster
When the bus is free any unit may start to transmit a message. The unit with the
message of higher priority to be transmitted gains bus access.
Arbitration
Whenever the bus is free, any unit may start to transmit a message. If 2 or more units start
transmitting messages at the same time, the bus access conflict is resolved by bitwise
arbitration using the IDENTIFIER. The mechanism of arbitration guarantees that neither
information nor time is lost. If a DATA FRAME and a REMOTE FRAME with the same
IDENTIFIER are initiated at the same time, the DATA FRAME prevails over the
REMOTE FRAME. During arbitration every transmitter compares the level of the bit
transmitted with the level that is monitored on the bus. If these levels are equal the unit
may continue to send. When a ’recessive’ level is sent and a ’dominant’ level is
monitored (see Bus Values), the unit has lost arbitration and must withdraw without
sending one more bit.
Safety
In order to achieve the utmost safety of data transfer, powerful measures for error
detection, signalling and self-checking are implemented in every CAN node.
Error Detection
For detecting errors the following measures have been taken:
- Monitoring (transmitters compare the bit levels to be transmitted with the bit
levels detected on the bus)
- Cyclic Redundancy Check
- Bit Stuffing
- Message Frame Check
Acknowledgment
All receivers check the consistency of the message being received and will
acknowledge a consistent message and flag an inconsistent message.
Sleep Mode / Wake-up
To reduce the system’s power consumption, a CAN-device may be set into sleep mode
without any internal activity and with disconnected bus drivers. The sleep mode is
finished with a wake-up by any bus activity or by internal conditions of the system.
Onwake-up, the internal activity is restarted, although the transfer layer will be waiting
for the system’s oscillator to stabilize and it will then wait until it has synchronized itself
to the bus activity (by checking for eleven consecutive ’recessive’ bits), before the bus
drivers are set to "on-bus" again. In order to wake up other nodes of the system, which
are in sleep-mode, a special
wake-up message with the dedicated, lowest possible
IDENTIFIER (rrr rrrd rrrr; r = ’recessive’ d = ’dominant’) may be used.
MESSAGE TRANSFER
3.1 Frame Types
Message transfer is manifested and controlled by four different frame types:
START OF FRAME
Marks the beginning of DATA FRAMES and REMOTE FRAMEs. It consists of a single
’dominant’ bit.
A station is only allowed to start transmission when the bus is idle (see BUS IDLE). All
stations have to synchronize to the leading edge caused by START OF FRAME (see
’HARD SYNCHRONIZATION’) of the station starting transmission first.
ARBITRATION FIELD
The ARBITRATION FIELD consists of the IDENTIFIER and the RTR-BIT.
IDENTIFIER
The IDENTIFIER’s length is 11 bits. These bits are transmitted in the order from ID-10
to ID-0. The least significant bit is ID-0. The 7 most significant bits (ID-10 - ID-4) must
not be all ’recessive’.
RTR BIT
Remote Transmission Request BIT In DATA FRAMEs the RTR BIT has to be
’dominant’. Within a REMOTE FRAME the RTR BIT has to be ’recessive’.
CONTROL FIELD
The CONTROL FIELD consists of six bits. It includes the DATA LENGTH CODE and
two bits reserved for future expansion. The reserved bits have to be sent ’dominant’.
Receivers accept ’dominant’ and ’recessive’ bits in all combinations.
DATA LENGTH CODE
The number of bytes in the DATA FIELD is indicated by the DATA LENGTH CODE.
This DATA LENGTH CODE is 4 bits wide and is transmitted within the CONTROL
FIELD.
DATA FIELD
The DATA FIELD consists of the data to be transferred within a DATA FRAME. It can
contain from 0 to 8 bytes, which each contain 8 bits which are transferred MSB first.
CRC FIELD
Contains the CRC SEQUENCE followed by a CRC DELIMITER.
CRC DELIMITER
The CRC SEQUENCE is followed by the CRC DELIMITER which consists of a single
’recessive’ bit.
ACK FIELD
The ACK FIELD is two bits long and contains the ACK SLOT and the ACK
DELIMITER. In the ACK FIELD the transmitting station sends two ’recessive’ bits. A
RECEIVER which has received a valid message correctly, reports this to the
TRANSMITTER by sending a ’dominant’ bit during the ACK SLOT (it sends ’ACK’).
ACK
ACK SLOT
All stations having received the matching CRC SEQUENCE report this within the ACK
SLOT by superscribing the ’recessive’ bit of the TRANSMITTER by a ’dominant’ bit.
ACK DELIMITER
The ACK DELIMITER is the second bit of the ACK FIELD and has to be a ’recessive’
bit. As a consequence, the ACK SLOT is surrounded by two ’recessive’ bits (CRC
DELIMITER, ACK DELIMITER).
END OF FRAME
Each DATA FRAME and REMOTE FRAME is delimited by a flag sequence
The CRC field, containing a fifteen bit cyclic redundancy check code and a recessive
delimiter bit
The ACKnowledge field, consisting of two bits. The first is the Slot bit which is
transmitted as recessive, but is subsequently over written by dominant bits transmitted
from any node that successfully receives the transmitted message. The second bit is a
recessive delimiter bit
The End of Frame field, consisting of seven recessive bits.
Following the End Of Frame is the INTermission field consisting of three recessive bits.
After the three bit INTermission period the bus is recognised to be free. Bus Idle time
maybe of any arbitrary length including zero.
2.0B Format
The CAN 2.0B format provides a twenty nine (29) bit identifier as opposed to the 11 bit
identifier in 2.0A.
- In Version 2.0B the Arbitration field contains two identifier bit fields. The first (the base
ID) is eleven (11) bits long for compatibility with Version 2.0A. The second field (the ID
extension) is eighteen (18) bits long, to give a total length of twenty nine (29) bits.
- The distinction between the two formats is made using an Identifier Extension (IDE)
bit.
- A Substitute Remote Request (SRR) bit is also included in the Arbitration Field. The
SRR bit is always transmitted as a recessive bit to ensure that, in the case of arbitration
between a Standard Data Frame and an Extended Data Frame, the Standard Data Frame
will always have priority if both messages have the same base (11 bit) identifier.
All other fields in a 2.0B Message Frame are identical to those in the Standard format.
ERROR FRAME
The ERROR FRAME consists of two different fields. The first field is given by
the superposition of ERROR FLAGs contributed from different stations. The following
second field is the ERROR DELIMITER.
In order to terminate an ERROR FRAME correctly, an ’error passive’ node may need the
bus to be ’bus idle’ for at least 3 bit times (if there is a local error at an ’error passive’
receiver). Therefore the bus should not be loaded to 100%.
ERROR FLAG
There are 2 forms of an ERROR FLAG: an ACTIVE ERROR FLAG and a PASSIVE
ERROR FLAG.
1. The ACTIVE ERROR FLAG consists of six consecutive ’dominant’ bits.
2. The PASSIVE ERROR FLAG consists of six consecutive ’recessive’ bits unless it is
overwritten by ’dominant’ bits from other nodes.
ERROR DELIMITER
The OVERLOAD FRAME contains the two bit fields OVERLOAD FLAG and
OVERLOAD DELIMITER.
There are two kinds of OVERLOAD conditions, which both lead to the transmission of
an OVERLOAD FLAG:
1. The internal conditions of a receiver, which requires a delay of the next DATA
FRAME or REMOTE FRAME.
2. Detection of a ’dominant’ bit during INTERMISSION.
OVERLOAD FLAG
consists of six ’dominant’ bits. The overall form corresponds to that of the ACTIVE
ERROR FLAG.
The OVERLOAD FLAG’s form destroys the fixed form of the INTERMISSION field.
As a consequence, all other stations also detect an OVERLOAD condition and on their
part start transmission of an OVERLOAD FLAG. (In case that there is a ’dominant’ bit
detected during the 3rd bit of INTERMISSION locally at some node, the other nodes will
not interpret the OVERLOAD FLAG correctly, but interpret the first of these six
’dominant’ bits as START OF FRAME. The sixth ’dominant’ bit violates the rule of bit
stuffing causing an error condition).
OVERLOAD DELIMITER
consists of eight ’recessive’ bits. The OVERLOAD DELIMITER is of the same form as
the ERROR DELIMITER. After transmission of an OVERLOAD FLAG the station
monitors the bus until it detects a transition from a ’dominant’ to a ’recessive’ bit. At this
point of time every bus station has finished sending its OVERLOAD FLAG and all
stations start transmission of seven more ’recessive’ bits in coincidence.
Bit time
As defined in ISO11898, the nominal time for each bit in a CAN message frame is made
up of four non-overlapping time segments as shown below.
Sync-seg is the segment that is used to synchronise the nodes on the bus. A bit edge
(if there is a data change) is expected during this segment.
Prop-Seg is a period of time that is used to compensate for physical delay times
within the network.
Phase-seg1 is a buffer segment that may be lengthened during resynchronisation to
compensate for oscillator drift and positive phase differences between the oscillators of
the transmitting and receiving node(s).
Phase-seg2 is a buffer segment that may be shortened during resynchronisation
(described below) to compensate for negative phase errors and oscillator drift.
The Sample point is always at the end of Phase-seg1 and is the time at which the bus
level is read and interpreted as the value of the current bit.
Whether transmitting or receiving, all nodes on a single CAN bus must have the same
nominal bit time. Bit time is programmable at each node on a CAN Bus and is a function
of the period of the oscillator local to each node, the value that is user-programmed into a
Baud Rate Prescaler (BRP) register in the controller at each node, and the programmed
number of time quanta per bit.
One time quanta (Also known as the system clock period) is defined as the period of the
local oscillator, multiplied by the value in the BRP.
Each of the four time segments in one bit is one or more time quanta long. As stated in
the Bosch CAN2 spec:
where the Information Processing Time is less than or equal to 2 time quanta.
Synchronisation
When any node receives a data frame or a remote frame, it is necessary for the receiver to
synchronise with the transmitter.
Because there is no explicit clock signal that a CAN system can use as a timing reference,
two mechanisms are used to maintain synchronisation.
To compensate for oscillator drift, and phase differences between transmitter and receiver
oscillators, additional synchronisation is needed.
So - for subsequent bits in any received frame, if a bit edge does not occur in the Sync-
seg segment of bit time, resynchronisation is automatically invoked and will shorten or
lengthen the current bit time depending on where the edge occurs. The maximum amount
by which the bit time is lengthened or shortened is determined by a user-programmable
number of time quanta known as the Synchronisation Jump Width (SJW).
Error Detection
CAN implements five error detection mechanisms; three at the message level and two at
the bit level.
Bit Monitoring
Bit Stuffing
Every transmitted message contains a 15 bit Cyclic Redundancy Check (CRC) code. The
CRC is computed by the transmitter and is based on the message content. All receivers
that accept the message perform a similar calculation and flag any errors.
Frame Check
There are certain predefined bit values that must be transmitted at certain points within
any CAN Message Frame.
If a receiver detects an invalid bit in one of these positions a Form Error (also known as a
Format Error) will be flagged.
Bit Monitoring
Any transmitter automatically monitors and compares the actual bit level on the bus with
the level that it transmitted. If the two are not the same, a bit error is flagged.
Bit Stuffing
CAN uses a technique known as bit stuffing as a check on communication integrity.
After five consecutive identical bit levels have been transmitted, the transmitter will
automatically inject (stuff) a bit of the opposite polarity into the bit stream.
Receivers of the message will automatically delete (de-stuff) such bits before processing
the message in any way.
Because of the bit stuffing rule, if any receiving node detects six consecutive bits of the
same level, a stuff error is flagged.
Error Frame
If an error is detected by any node, using any and all of the five mechanisms described
above, the node that detects the error aborts the transmission by sending an Error Frame.
This prevents any other node from accepting the message and ensures consistency of data
throughout the network.
Error Confinement
Error confinement is a mechanism which is understood to be unique to CAN and
provides a method for discriminating between temporary errors and permanent failures.
Temporary errors may be caused by, spurious external conditions, voltage spikes, etc.
Permanent failures are likely to be caused by bad connections, faulty cables, defective
transmitters or receivers, or long lasting external disturbances.
The general principle only is described here. More detailed information is available in the
ISO standard, and in the data sheets from the device manufacturers.
Error Counts
When an error is flagged, error counts are added to one of two dedicated error count
registers within each CAN controller on each node.
It's more complex than stated here, but - in principal - receive errors are given a
weighting of 1 and are accumulated in a Receive Error Count register; transmit errors are
given a weighting of 8 and accumulated in a Transmit Error Count register.
If errors continue to occur, the error counts continue to increase. Any good messages
decrement the Error Count registers and, if no further errors are detected, both Error
Counts go back to zero.
Error Passive nodes can still transmit and receive messages but are restricted in relation
to how they flag any errors that they may detect.
The ISO standard (and some of the device data sheets) explain the precise mechanisms in
more detail.
For local errors (i.e. errors which may appear at only some nodes) the CRC check alone
has the following error detection capabilities:
Up to 5 single bit errors are 100% detectable, even if the errors are distributed
randomly within the code word
All single bit errors are detected if their total number within the code word is odd
The residual (undetected) error probability of the CRC check alone is 3 x 10 to the power
-5.
In conjunction with all the other error checking mechanisms, a more realistic value is 10
to the power -11.
BLOCK DIAGRAM
3.2.1 PIC18F4580
E_CAN MODULE:
PCI 18F4580 device contains CAN module. With a aid of CAN module peer
stations are connected via a serial bus.
INTRODUCTION OF MICROCONTROLLER:
PIC is a family of RISC micro controllers made by micro chip technology, rived
from the PIC1650 originally developed by general instruments micro electronics
division. Micro chip technology does not use PIC as an acronym; in fact the brand name
is PIC micro. It is generally regarded that PIC stands for peripheral interface controller,
although general instruments original acronym for the PIC1650 was programmable
intelligent computer.
The original PIC was build to be used with GI’s new 16 bit CPU, the CP1600.
While generally a good CPU, the CP1600 had poor input and output performance, and
the 8 bit PIC was developed in 1975 to improve performance of the over all system by off
loading input out put takes from the CPU. The PIC used simple micro code stored in
ROM to perform it takes and although the term wasn’t used at the time, it is a RISC
design that runs one instruction per cycle (4 oscillator cycles).
In 1985 general instruments spun of there micro electronics division and the new
owner ship canceled almost everything which by this time was mostly out of the date.
The PIC, however, was upgraded with EPROM to produce a programmable channel
controller, and today a huge variety of the PIC are available with varies on board
peripherals (serial communication modules UART, motor control kernels, ect) and
program memory from 512 words to 32k words and more (a word is one assembly
language instruction, varying from 12, 14, or 16 bit depending on the specific PIC
controller family).
• A timer module to allow the microcontroller to perform tasks for certain time
periods.
• A serial i/o port to allow data to flow between the controller and other devices
such as a PIC or another microcontroller.
• An ADC to allow the microcontroller to accept analogue input data for
processing.
Microcontrollers are:
• Smaller in size
• Consumes less power
• Inexpensive
Micro controller is a stand alone unit, which can perform functions on its own
without any requirement for additional hardware like I/O ports and external memory. The
heart of the microcontroller is the CPU core. In the past, this has traditionally been based
on a 8-bit microprocessor unit. For example Motorola uses a basic 6800 microprocessor
core in their 6805/6808 microcontroller devices.
The PIC start plus development system from microchip technology provides the
product development engineer with a highly flexible low cost microcontroller design tool
set for all microchip PIC micro devices. The pic start plus development system includes
PIC start plus development programmer and mplab IDE.
The PIC start plus programmer gives the product developer ability to program
user software in to any of the supported microcontrollers. The PIC start plus software
running under mplab provides for full interactive control over the programmer.
CORE FEATURES:
PERIPHERAL FEATURES:
FEATURES OF MICROCONTROLLER
Includes power full microchip PIC16F877A micro controller with 8Kb internal
Internal EPROM
Reset button
LCD DISPLAY
where their much smaller current needs than LED displays (microamperes compared with
mill amperes) prolong battery life. Liquid crystals are organic (carbon) compounds,
which exhibit both solid and liquid properties. A ‘cell’ with transparent metallic
conductors, called electrodes, on opposite daces, containing a liquid crystal, and on which
light falls, goes ‘dark’ when a voltage is applied across the electrodes. The effect is due to
The LCD display used in this project consists of 2 rows. Each row consists
displayed.
INTRODUCTION:
Crystalonics dot –matrix (alphanumeric) liquid crystal displays are available in
TN, STN types, with or without backlight. The use of C-MOS LCD controller and driver
ICs result in low power consumption. These modules can be interfaced with a 4-bit or 8-
bit micro processor /Micro controller.
The built-in controller IC has the following features:
Correspond to high speed MPU interface (2MHz)
80 x 8 bit display RAM (80 Characters max)
9,920 bit character generator ROM for a total of 240 character fonts. 208
character fonts (5 x 8 dots) 32 character fonts (5 x 10 dots)
64 x 8 bit character generator RAM 8 character generator RAM 8 character fonts
(5 x 8 dots) 4 characters fonts (5 x 10 dots)
Automatic reset circuit, that initializes the controller / driver ICs after power on.
REGISTERS:
The controller IC has two 8 bit registers, an instruction register (IR) and a data
register (DR). The IR stores the instruction codes and address information for display
data RAM (DD RAM) and character generator RAM (CG RAM). The IR can be written,
but not read by the MPU.
The DR temporally stores data to be written to /read from the DD RAM or CG
RAM. The data written to DR by the MPU, is automatically written to the DD RAM or
CG RAM as an internal operation.
When an address code is written to IR, the data is automatically transferred from
the DD RAM or CG RAM to the DR. data transfer between the MPU is then completed
when the MPU reads the DR. likewise, for the next MPU read of the DR, data in DD
RAM or CG RAM at the address is sent to the DR automatically. Similarly, for the MPU
write of the DR, the next DD RAM or CG RAM address is selected for the write
operation.
RS R/W Operation
BUSY FLAG:
When the busy flag is1, the controller is in the internal operation mode, and the
next instruction will not be accepted.
When RS = 0 and R/W = 1, the busy flag is output to DB7.
The next instruction must be written after ensuring that the busy flag is 0.
ADDRESS COUNTER:
The address counter allocates the address for the DD RAM and CG RAM
read/write operation when the instruction code for DD RAM address or CG RAM
address setting, is input to IR, the address code is transferred from IR to the address
counter. After writing/reading the display data to/from the DD RAM or CG RAM, the
address counter increments/decrements by one the address, as an internal operation. The
data of the address counter is output to DB0 to DB6 while R/W = 1 and RS = 0.
In the character generator RAM, the user can rewrite character patterns by
program. For 5 x 8 dots, eight character patterns can be written, and for 5 x 10 dots, four
character patterns can be written.
When the host processor is so fast that the strobes are too narrow to serve as the ‘E’ pulse
a. Prolong these pulses by using the hosts ‘Ready’ input
b. Prolong the host by adding wait states
c. Decrease the Hosts Crystal frequency.
Inspite of doing the above mentioned, if the problem continues, latch both the data and
control information and then activate the ‘E’ signal
When the controller is performing an internal operation he busy flag (BF) will set and
will not accept any instruction. The user should check the busy flag or should provide a
delay of approximately 2ms after each instruction.
The module presents no difficulties while interfacing slower MPUs.
The liquid crystal display module can be interfaced, either to 4-bit or 8-bit MPUs.
For 4-bit data interface, the bus lines DB4 to DB7 are used for data transfer, while DB0
to DB3 lines are disabled. The data transfer is complete when the 4-bit data has been
transferred twice.
The busy flag must be checked after the 4-bit data has been transferred twice. Two more
4-bit operations then transfer the busy flag and address counter data.
For 8-bit data interface, all eight-bus lines (DB0 to DB7) are used.
BLOCK DIAGRAM
The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac
voltage down to the level of the desired dc output. A diode rectifier then provides a full-
wave rectified voltage that is initially filtered by a simple capacitor filter to produce a dc
voltage. This resulting dc voltage usually has some ripple or ac voltage variation.
A regulator circuit removes the ripples and also remains the same dc value even if
the input dc voltage varies, or the load connected to the output dc voltage changes. This
voltage regulation is usually obtained using one of the popular voltage regulator IC units.
TRANSFORMER
The potential transformer will step down the power supply voltage (0-230V) to
(0-6V) level. Then the secondary of the potential transformer will be connected to the
precision rectifier, which is constructed with the help of op–amp. The advantages of
using precision rectifier are it will give peak voltage output as DC, rest of the circuits will
give only RMS output.
BRIDGE RECTIFIER
When four diodes are connected as shown in figure, the circuit is called as bridge
rectifier. The input to the circuit is applied to the diagonally opposite corners of the
network, and the output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive
potential, at point A and a negative potential at point B. the positive potential at point A
will forward bias D3 and reverse bias D4.
The negative potential at point B will forward bias D1 and reverse D2. At this
time D3 and D1 are forward biased and will allow current flow to pass through them; D4
and D2 are reverse biased and will block current flow.
The path for current flow is from point B through D1, up through RL, through
D3, through the secondary of the transformer back to point B. this path is indicated by the
solid arrows. Waveforms (1) and (2) can be observed across D1 and D3.
One-half cycle later the polarity across the secondary of the transformer reverse,
forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be
from point A through D4, up through RL, through D2, through the secondary of T1, and
back to point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can
be observed across D2 and D4. The current flow through RL is always in the same
direction. In flowing through RL this current develops a voltage corresponding to that
shown waveform (5). Since current flows through the load (RL) during both half cycles
of the applied voltage, this bridge rectifier is a full-wave rectifier.
The maximum voltage that appears across the load resistor is nearly-but never
exceeds-500 v0lts, as result of the small voltage drop across the diode. In the bridge
rectifier shown in view B, the maximum voltage that can be rectified is the full secondary
voltage, which is 1000 volts. Therefore, the peak output voltage across the load resistor is
nearly 1000 volts. With both circuits using the same transformer, the bridge rectifier
circuit produces a higher output voltage than the conventional full-wave rectifier circuit.
IC VOLTAGE REGULATORS
Voltage regulators comprise a class of widely used ICs. Regulator IC units
contain the circuitry for reference source, comparator amplifier, control device, and
overload protection all in a single IC. IC units provide regulation of either a fixed positive
voltage, a fixed negative voltage, or an adjustably set voltage. The regulators can be
selected for operation with load currents from hundreds of milli amperes to tens of
amperes, corresponding to power ratings from milli watts to tens of watts.
IN OUT
7805
From GND
Transformer
secondry
GND
terminal is connected to ground (GND). While the input voltage may vary over some
permissible voltage range, and the output load may vary over some acceptable range, the
output voltage remains constant within specified voltage variation limits. These
limitations are spelled out in the manufacturer’s specification sheets. A table of positive
voltage regulated ICs is provided in table 19.1.
7805 +5 7.3
7806 +6 8.3
7808 +8 10.5
PROGRAM DEVELOPMENT
FLOWCHART AND
WORKING
DESCRIPTION
RECEPTION OF DATA
The main objective of the project is to monitor and displayed the data flow in the
CAN bus.
The control data, which is confined in the bus, is received by the high speed CAN
transceiver. This data is fed to the CANRX pin of the PIC 18F4580.
The nature of the data is analysed. The analysis is done to identify whether it is an
11 –bit identifier or 29-bit identifier and also to recognize whether it is data frame or a
remove frame.
After analysis, the data and the analyzed result are transmitted to the system
through TX pin of the 18F4580. Each node receive the appropriate data and calculate it
then it displayed on nodes.
ALGORITHM
The organization of MPLAB tools by function helps make pull-down menus and
customizable quick keys easy to find and use. MPLAB tools allow assembling, compiling
and linking source code, and Debug the time with the MPLAB-ICE emulator. By using
the simulator timing measurements can be made.
Further, source code can be debugged with the aid of a Build Results generating
executable files. A Project Manager allows to group source files, precompiled object files,
libraries and linker script files into a project format. The MPLAB IDE also provides
feature-rich simulator and emulator environments to debug the logic of executables.
Some of the features are:
• A Variety of windows allowing to view the contents of all dates and program
memory locations source code, program memory and absolute listing windows
allowing to view the source code and its assembly-level equivalent separately and
together (Absolute Listing)
• The ability to step through execution, or apply break, Trace, Standard or Complex
Trigger points
Project manager is used to create a project and work with the specific files related
to the Project. When using a project, source code is rebuilt and downloaded to the
simulator or emulator with a single mouse click.
MPLAB EDITOR:
MAPAB Editor is used to create and edit text files such as source files, code and
linker script files.
MPLAB-SIM SIMULATOR:
The software simulator models the instruction execution execution I/O of the PIC
Microcontrollers (MCUs).
MPLAB-ICE EMULATORS:
The MPLAB-ICE emulator uses hardware to emulate PIC microcontroller in real
time, either with or without a target system.
MPLAB-ICE DEBUGGER:
The MPLAB-ICD is a Programmer for the PIC 16f87X family as well as an
in-circuit debugger. It programs hex files into the PIC16f87X and offers basic debugging
features like real-time code execution, stepping and break pints. MPASM Universal
Assembler/MPLINK Relocatable Linker/MPLIB Librarian the MPASM assembler allows
source code to be assembled without leaving MPLAB. MPLINK crates the final
application by linking Relocatable modules from MPASM and MPLAB-c17/c18. MPLIB
manages custom libraries for maximum code reuse.
The main advantage of using cross compliers is to reduce the time needed to
develop the program. By using a cross complier, the assembly code needed to perform
the desired function can be figure out. Another important advantage is that the
higher-level code is (generally) more portable.
Besides a potential increases in code size, there are other issues to be aware of.
When program timing is critical, clock cycles needed for any part of the program in the
assembly code should be know. This means writing the code in c and then compiling to
an .ASM file to see how the program is implemented. Along the same lines, the MPLAB
Simulator will not be available to help debug the C code. Normally software bugs are
known and documented by the manufacturer, with the bugs repaired in later versions of
the software.
The PICSTART Plus device Programmer is a device programmer system that has the
following features:
The in-circuit debugger requires exclusive use of some hardware and software
resources of the target.
The target PIC micro controller MCU must have a functioning clock and be
running.
The ICD can debug only when all the links in the system are fully functional.
As emulator provides memory and a clock, and can run code even
without being connected to the target application board. During the development
t and debugging cycle, an ICE provides the most power to get the
system fully functional, whereas an ICD may not be able to debug
at all if the application does not run. In-circuit debug connector can be placed on the
application board and connected to an ICD even after the system on the application board
and connected to an ICD even after the system is in production, allowing easy testing,
debugging and reprogramming of the application. Even though an ICD has some
drawbacks in comparison to an ICE, in this situation it has some distinct advantages:
• A connection to the application after the production cycle does not require extraction
of the Micro controller in order to insert an ICE probe. The ICD can reprogram the
firmware in the target application without any other connections or equipment.
BIBLIOGRAPHY
BIBLIOGRAPHY
[1] Roy Choudhury. D., Shail Hain., “Linear Integrated Circuits”, New Age International
(P) Ltd., Newdelhi, 2000.
Websites:
[4] www.ti.com
[5] www.analogdevice.com
[6] www.electronics-lab.com
[7] www.alldatasheets.com
[8] www.
12. CONCLUSION
In this project is only used in experiment only, but it made some error occurs
result s.
The CAN diagnostic tool captures the control data, which runs across the
CAN bus between the CAN modules, and it displays the status of the control
data on the system, to identify the presence of faulty CAN module. This
CAN diagnostic tool will be vey much helpful in the R&D department of
automobile industries and also even in the medical applications. In the
emerging trend of technology and science, the application of this system is
marked as an essential one. The main highlights of this tool are its
simplicity, efficient performance and robustness.