Author |
Message |
Topic: DAC7562 12bit SPI DAC programming problems. |
Rob_975
Replies: 6
Views: 16072
|
Forum: General CCS C Discussion Posted: Fri Dec 20, 2013 11:06 am Subject: DAC7562 12bit SPI DAC programming problems. |
Perfect, it works.
Just a little more thing.
For me the easiest way to write the 24bit word is in binary (because with the registers table I can easily set the proper bit):
dac=spi_xfer(id,0b00 ... |
Topic: DAC7562 12bit SPI DAC programming problems. |
Rob_975
Replies: 6
Views: 16072
|
Forum: General CCS C Discussion Posted: Tue Dec 17, 2013 3:09 pm Subject: DAC7562 12bit SPI DAC programming problems. |
Hi there.
I'm having hard times to menage the DAC7562 DAC via SPI.
I use a PIC18F67K22@48MHz and the SPI bus is working (oscilloscope tested).
I use the SPI PIC hardware pins: 34=clk, 35=data in ... |
Topic: Current Sensor ADC scaling. |
Rob_975
Replies: 10
Views: 17064
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 1:54 pm Subject: Current Sensor ADC scaling. |
If you are only looking at one channel, you can set the adc channel outside the loop which eliminates that and the following delay from the inner loop.
mikey
Ok, corrected.
Thanks. |
Topic: Current Sensor ADC scaling. |
Rob_975
Replies: 10
Views: 17064
|
Forum: General CCS C Discussion Posted: Wed Dec 04, 2013 1:53 pm Subject: Current Sensor ADC scaling. |
i sure hope the VAR 'current' is an int32
current += read_adc();
No, it's an float.
Why? |
Topic: Current Sensor ADC scaling. |
Rob_975
Replies: 10
Views: 17064
|
Forum: General CCS C Discussion Posted: Mon Dec 02, 2013 2:38 pm Subject: Current Sensor ADC scaling. |
OK, thank you very much guys.
Problem solved by means of Alan's formula and a few of small adjustments because of the components tolerances.
ASMboy, cant change the design, I already have the PCB wi ... |
Topic: Current Sensor ADC scaling. |
Rob_975
Replies: 10
Views: 17064
|
Forum: General CCS C Discussion Posted: Sun Dec 01, 2013 3:57 am Subject: Current Sensor ADC scaling. |
Hi all.
I'm using an ACS713 as current sensor with a 18F67k22 @ 12bit res.
I don't have any clue about how to calculate the scaling factor to get the right Ampere reading.
As per specs. this sens ... |
Topic: Strange "undefined identifier" |
Rob_975
Replies: 3
Views: 6272
|
Forum: General CCS C Discussion Posted: Wed Mar 20, 2013 4:45 am Subject: Strange "undefined identifier" |
OK guys, now it's working.
Thank you! |
Topic: Strange "undefined identifier" |
Rob_975
Replies: 3
Views: 6272
|
Forum: General CCS C Discussion Posted: Mon Mar 18, 2013 3:32 pm Subject: Strange "undefined identifier" |
Hello,
I have a problem here with a undefined identifier in my main.c
here's part of the code:
http://s13.postimage.org/7qrk01lrb/error.jpg
the strange thing is that is only the first elemen ... |
Topic: Learning about PICs and CCS together. |
Rob_975
Replies: 12
Views: 16099
|
Forum: General CCS C Discussion Posted: Thu Nov 01, 2012 11:57 am Subject: Learning about PICs and CCS together. |
The best would be find a very good book with also advanced features of the PIC like timers, PWM, interrupts explained in depth.
I already know the basics of C but now the problem is the integration o ... |
Topic: Learning about PICs and CCS together. |
Rob_975
Replies: 12
Views: 16099
|
Forum: General CCS C Discussion Posted: Wed Oct 31, 2012 1:56 am Subject: Learning about PICs and CCS together. |
Hello.
Don't know if I'm off topic in this forum but hopefully this thread will also help others.
I'm looking for a good book explaining the basics of the MCUs and programming with the CCS compile ... |
Topic: PIC18F452 @ 20MHz slowdown by LED. |
Rob_975
Replies: 2
Views: 5700
|
Forum: General CCS C Discussion Posted: Tue Oct 30, 2012 2:34 pm Subject: PIC18F452 @ 20MHz slowdown by LED. |
Hi,
I have a PIC18F452 with 20MHz crystal behaving strange.
When I insert the lines :
output_low(PIN_D7);
delay_ms(1500);
output_high(PIN_D7);
delay_ms(100 ... |
Topic: About Silicon Revision. |
Rob_975
Replies: 2
Views: 6793
|
Forum: General CCS C Discussion Posted: Fri Oct 05, 2012 3:28 pm Subject: About Silicon Revision. |
Hi.
Somebody knows which is the difference between PIC suffix I/P and
I/PTSRL?
The datasheet of the 18F87K22 says that TSRL is silicon revision A3.
Now, since Digikey has both of them, is the ... |
Topic: PIC18 Strange Clock Frequency. |
Rob_975
Replies: 5
Views: 8257
|
Forum: General CCS C Discussion Posted: Mon Oct 01, 2012 12:06 pm Subject: PIC18 Strange Clock Frequency. |
...Add NOPLLEN to the fuses (just worth trying), and literally do a one second on, one second off LED flash, using no other hardware, program this into the chip and see if this works. If it does then ... |
Topic: PIC18 Strange Clock Frequency. |
Rob_975
Replies: 5
Views: 8257
|
Forum: General CCS C Discussion Posted: Mon Oct 01, 2012 2:04 am Subject: PIC18 Strange Clock Frequency. |
Have you tried using a 16mhz oscillator in ec2 mode with the 4x PLL ??
It'll be difficult as the oscillator is a small SMD package and I don't have the 16MHz one.
Crazy. |
Topic: PIC18 Strange Clock Frequency. |
Rob_975
Replies: 5
Views: 8257
|
Forum: General CCS C Discussion Posted: Sun Sep 30, 2012 8:57 am Subject: PIC18 Strange Clock Frequency. |
I did some further investigations.
I have a LED on the board.
with the #use delay(clock=64000000)
the on/off timing of the led is half the time I set in the software.
If I set #use delay ... |
|