Author |
Message |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Tue Aug 15, 2023 7:29 pm Subject: 18f14k22 DAC |
years ago...(shh, don't ask...) I'd get caught same way, as MPLAB's default was 'debug'. When I called Microchip, the SW eng was surprised I never used 'debug'...
That's right, in the real world it's ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Tue Aug 15, 2023 9:55 am Subject: 18f14k22 DAC |
when you say you compiled with MPLAB, did you set the 'build configuration' to 'release' ?
You are right: "Release" should have been set. Now the .hex files (generated with Mplab and CCS Co ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Tue Aug 15, 2023 2:59 am Subject: 18f14k22 DAC |
Yes. It was fixed in 5.072.
Understand, 5.066, is over six years old. 5.040, seven. You were using
very old faulty compilers....
Thanks Ttelmah,
But I tried to use MPLAB 8.92 with ccs 5.11 ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Mon Aug 14, 2023 7:06 pm Subject: 18f14k22 DAC |
Hi all,
I tested under ccs compiler v. 5.115, it works! |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 10:20 pm Subject: 18f14k22 DAC |
I have now seen https://www.ccsinfo.com/devices.php?page=versioninfo.
I will try with a compiler from Microchip.
Thanks everyone for all the advice. I think the post can be closed. |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 9:07 am Subject: 18f14k22 DAC |
I use now another CCS compiler, v. 5040, but RA0 is the same: no signal. |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 6:47 am Subject: 18f14k22 DAC |
2) dump the listing and confirm that the proper register bits are set (enable and output )
The VREFCON1 register is set by setup_dac(DAC_OUTPUT | DAC_VSS_VDD) to A0. |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 5:34 am Subject: 18f14k22 DAC |
2) dump the listing and confirm that the proper register bits are set (enable and output )
Thank you temtronic.
I don't use the op-amp as a buffer, I visualize the signal on RA0 with the oscillo ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 4:33 am Subject: 18f14k22 DAC |
I tested with led: led toggle with 650ms period, so the program is in the while(1) loop. |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 4:21 am Subject: 18f14k22 DAC |
My PICKIT3 is totally disconnected when 18f14k22 is running, I remove the cable from the ICSP connector! MCLR is 1 when uC is running. |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sun Aug 13, 2023 4:15 am Subject: 18f14k22 DAC |
Thanks Ttelmah for reply.
CCS Compiler version is 5.066
I run the program under MPLAB v. 8.92 (CCS Compiler) and test it step by step. The program is in the while(1) loop: it does dac_write(i) 32 ti ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sat Aug 12, 2023 9:23 pm Subject: 18f14k22 DAC |
curious..
downloaded the datasheet... 20 pin device, seems DAC1OUT pin is RA0 which is ALSO used as PGD ( programming pin ).
If this is correct, have you disconnected your programmer from the PIC ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sat Aug 12, 2023 9:22 pm Subject: 18f14k22 DAC |
and you have the delay as shown?.
Yes. Now delay is 1000. |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sat Aug 12, 2023 6:38 am Subject: 18f14k22 DAC |
Thanks Ttelmah,
I'm using a Hantek DSO4254C oscilloscope, with 1Mohm/20pF probes.
I insert the modification with A0 analog channel and it behaves the same, it does not send a sawtooth signal at the ... |
Topic: 18f14k22 DAC |
vas57
Replies: 28
Views: 37897
|
Forum: General CCS C Discussion Posted: Sat Aug 12, 2023 4:01 am Subject: 18f14k22 DAC |
Thank you Ttelmah for reply.
I modified the DAC test but I still have no signal on the analog output.
#include <18F14K22.h>
#use delay(internal = 4MHZ)
void main(void)
& ... |
|