The PIC18F2685’s ADC module is capable of resolving
10 bits of resolution. That is equivalent to 1024 steps
including zero. The PIC18F2685’s ADC is referenced to the
supply voltage according to the cleared bits in the upper
nibble of the ADCON1 register value. So, that
means every step of the PIC18F2685’s ADC will
represent approximately 0.005 volts. That means
that 1°C is equal to two ADC steps. So, to get an
absolute temperature result we need only to read
the ADC and divide by two. In the code that
follows, I read the AD594’s output 20 times,
take the average of the 20 readings, and divide the
average by two (see Listing 2).
Nothing to it. Now that you know how to make
an AD594 work for you, I’ll show you
one that is ready for action in Photo 5.
dataLen = 4; //length of CAN message
id = brd_display_temp_id; //sender’s CAN ID
data = addr_ad594; //destination CAN ID
//the CAN message contains this data:
data = temp_in_C;
data = make8(temp_in_C,1); // high byte
data = make8(temp_in_C,0); //low byte
while(!ECANSendMessage(id, data, dataLen, ECAN_TX_STD_FRAME));
The Standard for checking
Good enough to be the
choice of Panasonic,
Pioneer, NBC, ABC, Ford,
JVC, NASA and thousands
of independent service
Locate shorted or leaky
components or conditions
to the exact spot in-circuit
Still cutting up the pcb,
and unsoldering every
part trying to guess at
where the short is?
CAN YOU DO THIS?
Your DVM shows the same shorted reading all
along the pcb trace. LeakSeeker 82B has the
resolution to find the defective component.
And with a 60 day trial period, satisfaction Touch pads along the trace, and LeakSeeker
guaranteed or money-back policy, the only beeps highest in pitch at the defect’s pad. Now
thing you can lose is all the time you’re you can locate a shorted part only a quarter of
currently spending on trying to repair all an inch away from a good part. Short can be
those dogs you’ve given up on. from 0 to 150 ohms
CapAnalyzer 88A LeakSeeker 82B
Available at your distributor, or call 561-487-6103
Electronic Design Specialists www.eds-inc.com
Inexpensive enough to pay for itself in just
one day’s repairs. At $209, it’s affordable.
Yep. You’re trained. The next
time you tackle what seems to be a
difficult embedded project, just kick
back and think of the I/O basics you
need to accomplish each individual
task. Once you’ve worked out the
fundamentals, merge all of the
solutions together to complete the
I’ll leave you with something to
consider. How would you send the
AD594 data to another PIC-based
computing node? Listing 3 shows how
I did it.
Yes you CAN! Put another notch
in your soldering iron. NV
When you’re serious about hardware, you need serious tools.
Whether milling 0.020” traces on prototype PCBs or cutting ½”
steel battle armor, this CNC mill can do it all. Weighing in at more
than 1100 lbs, the PCNC can deliver the hardware end of your
combined hardware & software projects.
■ Analog Devices
Tormach PCNC 1100 Features:
Table size 34" x 9. 5"
R8 Spindle 1.5 hp variable speed to 4500 RPM
Computer controlled spindle speed and direction
Precision ground ballscrews
Digitizing and tool sensing support
4th axis and high speed spindle options
■ Allegro MicroSystems
■ Zetex Semiconductors
( www.Zetex.com): ZVN4306G
■ International Rectifier
3 Axis Mill
Mill includes Control, CAD and CAM
software. Optional stand, coolant system,
computer and accessories are extra.
Product information and online ordering at www.tormach.com
CONTACT THE AUTHOR
■ Fred Eady can be reached via
email at firstname.lastname@example.org.