Author |
Message |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Mon Feb 14, 2011 10:31 am Subject: 18F26K22 A/D example Please |
Only with all of your help!
Thanks
Brian |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Mon Feb 14, 2011 8:01 am Subject: 18F26K22 A/D example Please |
I thought [setup_adc_ports(sAN0|VSS_VDD);] would have set ANSEL to 0x01 but it doesn't. Armed with this knowledge all I should have to do is make sure I manually set ANSEL.
Thanks
Brian |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sun Feb 13, 2011 7:47 pm Subject: 18F26K22 A/D example Please |
PCM programmer
I tested the code with my hardware and I get the same results as before (ANSELA remains at POR value).
The manual register select code work as expected.
Thanks
Brian |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sun Feb 13, 2011 3:14 pm Subject: 18F26K22 A/D example Please |
Thanks for the reply I'll test it out. In the mean time I have the program working using manual setting of registers and testing / toggling the GO/DONE bit.
#byte ANSELA = 0xf38
#byte ANSELB = 0x ... |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sun Feb 13, 2011 11:19 am Subject: 18F26K22 A/D example Please |
Thanks! Can I also define CONFIG3H in the same way? It's address is huge (300005h). I would like to clear bit #1 (PBADEN) in this register so the portB a/d's are disabled upon POR.
Thanks
Brian |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sun Feb 13, 2011 9:47 am Subject: 18F26K22 A/D example Please |
Still no luck getting the adc to work. The ANSELA value never changes from the default POR setting (00101111b) even after the following lines execute:
setup_adc(ADC_CLOCK_INTERNAL);
setup_ad ... |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sat Feb 12, 2011 9:09 pm Subject: 18F26K22 A/D example Please |
Thanks Guys for the replies!
I'll check out the code early tomorrow.
P.S.
My version is 4.110
Thanks again
Brian |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sat Feb 12, 2011 2:33 pm Subject: 18F26K22 A/D example Please |
Thanks for the reply. I tried looking at the header file and I'm able to get the program to compile. The trouble is I'm not getting the results I would expect. I select the an0 port only as follow ... |
Topic: 18F26K22 A/D example Please |
bdrmachine
Replies: 17
Views: 27013
|
Forum: General CCS C Discussion Posted: Sat Feb 12, 2011 10:44 am Subject: 18F26K22 A/D example Please |
I am having trouble setting up the a/d on a 18f26k22. I need to read a 10bit value from an0 only using vss/vdd as references. I have successfully configured other pics for a/d. The application is n ... |
Topic: Out of memory error? |
bdrmachine
Replies: 6
Views: 10543
|
Forum: General CCS C Discussion Posted: Mon Jan 31, 2011 7:30 am Subject: Out of memory error? |
Where is the compiler getting its' part specific memory size. Is this pulled from the top part of the header file? I did notice that the ram size was stated as 512. I changed it to 3896 as stated i ... |
Topic: Out of memory error? |
bdrmachine
Replies: 6
Views: 10543
|
Forum: General CCS C Discussion Posted: Sun Jan 30, 2011 8:05 pm Subject: Out of memory error? |
Sorry I forgot to add the compiler states 3%
The output from the printf is "ROM size is: 1cc0" |
Topic: Out of memory error? |
bdrmachine
Replies: 6
Views: 10543
|
Forum: General CCS C Discussion Posted: Sun Jan 30, 2011 8:03 pm Subject: Out of memory error? |
The memory usage gauge reads 121 bytes using version 4.111 |
Topic: Out of memory error? |
bdrmachine
Replies: 6
Views: 10543
|
Forum: General CCS C Discussion Posted: Sun Jan 30, 2011 5:58 pm Subject: Out of memory error? |
I had a working program before I switched processors from a 18f2550 (32k flash) to a 18f26k22 (64k flash). Even though the memory size doubled I get the following error:
Executing: "C:\Progr ... |
Topic: 18F2550 porta problem |
bdrmachine
Replies: 1
Views: 3435
|
Forum: General CCS C Discussion Posted: Sun Jan 23, 2011 9:14 am Subject: 18F2550 porta problem |
I am having a problem understanding why my 18F2550 processor will not change port A pin states properly. PIN_A4 will not change using output_low(PIN_A4) or output_bit(PIN_A4, 0). The same is true if ... |
|