Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

i'm at a critical part to completion.

Status
Not open for further replies.

doshie

Newbie level 1
Joined
May 28, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
critical part

as the matter stated, i did my part of the programming... im using jhd 162a lcd, pic 16f877a, and an unknown wiegand RFID reader and am using CCS. The following codes written is running fairly well and might need some optimization. but thats not the focus here.

im trying to interface 2 more components to the ADC input port and output port, namely the laser pointer and a photodiode for my "RFID security project".

i tried to simulate the ADC programming in proteus but it doesnt work. Therefore im referring to the experts if you may help me. im having problem with the programming, as the simulation in proteus is not applicable for practical circuit due to timing and so on which i do not know of.

i only manage to come up with these (the following attachment) with my lack of knowledge and understanding of the PIC programming. I am still new to PIC programming.

Thank you in advance for any thoughts, advice and help that may be given.

Here we go....
 

Ave_Rapina

Full Member level 2
Joined
Jan 6, 2004
Messages
122
Helped
18
Reputation
36
Reaction score
4
Trophy points
1,298
Location
Po
Activity points
683
Hello,

I think you are using ccs.

To configure an use an Adc of the micro here are the steps.

#device adc=8 or 10 -> bits to use

set_tris_porta(0x00000001); you can skip this whe you use setup_adc_port
setup_adc_ports(AN0|VSS_VDD); For the an0 input, or ANO_To_ANX for more,
setup_adc(ADC_CLOCK_INTERNAL); Use of the internal clock


set_adc_channel(0);
and them var=read_adc();

You can Simulate this in proteus without any problem

Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top