Author |
Message |
Topic: ADC with PIC18f4580 |
thanhandaithanh
Replies: 14
Views: 23452
|
Forum: General CCS C Discussion Posted: Tue Oct 31, 2017 8:15 am Subject: ADC with PIC18f4580 |
You are sure you are connecting the voltage to the right pin?.
I have just tested this with a 4580 at 8MHz, and it merrily outputs the value on the port.
Can you upload the image of ISIS file ... |
Topic: ADC with PIC18f4580 |
thanhandaithanh
Replies: 14
Views: 23452
|
Forum: General CCS C Discussion Posted: Tue Oct 31, 2017 8:08 am Subject: ADC with PIC18f4580 |
Even with the second version as posted?.
What is on port B?.
Yes, even with your second version
Nothing on port B
[/img] |
Topic: ADC with PIC18f4580 |
thanhandaithanh
Replies: 14
Views: 23452
|
Forum: General CCS C Discussion Posted: Tue Oct 31, 2017 7:52 am Subject: ADC with PIC18f4580 |
Unfortunately, some comments are being addressed to code that was a reply to the original post.
Lets just look at the original:
First comment. Have you verified that the PIC is actually running? ... |
Topic: ADC with PIC18f4580 |
thanhandaithanh
Replies: 14
Views: 23452
|
Forum: General CCS C Discussion Posted: Mon Oct 30, 2017 10:48 pm Subject: ADC with PIC18f4580 |
What PIC do you really have ? Your title says 18F4580, but your program
says 18F458. Those are different PICs.
What is your CCS compiler version ?
I tried both of them, they don't work |
Topic: ADC with PIC18f4580 |
thanhandaithanh
Replies: 14
Views: 23452
|
Forum: General CCS C Discussion Posted: Mon Oct 30, 2017 10:47 pm Subject: Re: ADC with PIC18f4580 |
http://i64.tinypic.com/29y4ho3.png
modify according to your settings
http://i65.tinypic.com/209sxgn.png
I don't know what is problem in my code ? |
Topic: ADC with PIC18f4580 |
thanhandaithanh
Replies: 14
Views: 23452
|
Forum: General CCS C Discussion Posted: Mon Oct 30, 2017 9:27 pm Subject: ADC with PIC18f4580 |
I have a problem with read_adc(). I cannot read adc value from AN0 of this Pic
This is my code:
#include <18f458.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#device adc=8
#use delay(clock=2000 ... |
|