


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Lab; Professor: Farook; Class: Microcomputer Hdwr Dsn; Subject: Electrical & Computr Engr Tech; University: Purdue University-Calumet Campus; Term: Unknown 1989;
Typology: Lab Reports
1 / 4
This page cannot be seen from the preview
Don't miss anything!
Write a Software for 16F88 to take Analog Inputs from the Port A0, A1, And Vdd and take the digital output on Port B. Resolution of ADC is 10 bits and Clock rate ,
Write software for PC to take input from the Port B of 16F88 through PortA of USB-1024LS. And show it to the monitor.
A7A6 2827
A5A4 2625
A3 24
A1A0 2221 B3B2 98 A2 23 B1B0^76
B7B6 1312
B5B4 1110 29
17 RA
14 Vdd
2 Vref
18 RA1 ANALOG
INPUTS
+5V
Program for the 16F88.
#include<16F88.h> #device ADC= #fuses INTRC_IO, NOWDT, PUT, NOMCLR, NOBROWNOUT, NOLVP
#use delay(clock=8000000) long readValue(void); void updateDisplay(long num); long value=0; void main(void) { set_tris_a(0xFF); set_tris_b(0x00); setup_adc_ports(sAN0 | sAN1 | VSS_VDD); setup_adc(ADC_CLOCK_DIV_64); output_b(0xFF); while(1) { value = readValue(); updateDisplay(value); } } long readValue(void) { float result=0.0, fiveDividedBy1024=0.0048828125;
output_b(display[num]); }