CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 14 matches
CCS Forum Index
Author Message
  Topic: Interfacing PIC to removable memory
qoou

Replies: 4
Views: 11108

PostForum: General CCS C Discussion   Posted: Wed Jun 14, 2017 8:37 am   Subject: Interfacing PIC to removable memory
I'm using a PIC16F1789.

I'd like to have some type of removal memory storage interfaced with the pic. The type of memory device is not important, as long as I can easily remove it and connect it t ...
  Topic: PWM on ccp1 - no output [SOLVED]
qoou

Replies: 7
Views: 20359

PostForum: General CCS C Discussion   Posted: Sun Oct 16, 2016 6:41 pm   Subject: PWM on ccp1 - no output [SOLVED]
With Alternate Pin Functions you typically get a choice of two pre-defined
pins for a peripheral function. You have to choose one pin or the other.
Example, for CCP1 output, you get to pick Pin B0 ...
  Topic: PWM on ccp1 - no output [SOLVED]
qoou

Replies: 7
Views: 20359

PostForum: General CCS C Discussion   Posted: Sun Oct 16, 2016 4:13 pm   Subject: PWM on ccp1 - no output [SOLVED]
The 16F1784 does not have Pin Select. It has Alternate Pin Functions.

Thanks. I'm not sure I understand the difference between pin select/alternate pin functions. Is this saying ccp1 can be used ...
  Topic: PWM on ccp1 - no output [SOLVED]
qoou

Replies: 7
Views: 20359

PostForum: General CCS C Discussion   Posted: Sun Oct 16, 2016 3:54 pm   Subject: PWM on ccp1 - no output [SOLVED]
first line of code HAS to be the #include PICtype header
2nd line would be 'fuses'...

3rd thing is to disable ALL other peripherals that use the pin
4th does that PIC have 'pin select' ( I don' ...
  Topic: PWM on ccp1 - no output [SOLVED]
qoou

Replies: 7
Views: 20359

PostForum: General CCS C Discussion   Posted: Sun Oct 16, 2016 3:01 pm   Subject: PWM on ccp1 - no output [SOLVED]
PIC16F1784
http://ww1.microchip.com/downloads/en/DeviceDoc/40001637C.pdf
Compiler version 5.040

#include <16F1784.h>
#device ADC=16

#FUSES NOWDT //No Watch Dog Timer ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Tue Oct 04, 2016 12:57 pm   Subject: Using a FVR for the ADC (pic16f1784)

Your first post had ANSEL0 (zero); now changed to ANSELD (Delta).

No.

I write to both ANCON0, and ANSELD......

I'm almost ready to believe that you're just trolling me? Rolling Eyes

http:// ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Tue Oct 04, 2016 10:47 am   Subject: Using a FVR for the ADC (pic16f1784)
You are typing something wrong.

I tested the code as posted on your compiler version:

#byte ANSELD=getenv("SFR:ANSELD")

void main()
{
ANSELD=0;
} ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Mon Oct 03, 2016 12:45 pm   Subject: Using a FVR for the ADC (pic16f1784)
Can confirm it does not configure the ADC for Vref:

#byte ADCON0=getenv("SFR:ADCON0")
#byte ANSEL0=getenv("SFR:ANSEL0")

setup_vref(VREF_ON|VREF_A ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Fri Sep 30, 2016 7:42 am   Subject: Using a FVR for the ADC (pic16f1784)
Guy is spot on here.

As you change speeds, the CPU power consumption changes, but the peripheral consumption remains the same.
Now when you talk about 'displaying the data on an LCD'. What sort o ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Thu Sep 29, 2016 10:43 pm   Subject: Using a FVR for the ADC (pic16f1784)
This PIC has 3 internal oscillators: 16 MHz, 500 kHz, 31 kHz
Take a look at page 68 in the datasheet - there are many frequency options in between. These are only actual oscillators.

Ah, didn't s ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Thu Sep 29, 2016 12:18 pm   Subject: Using a FVR for the ADC (pic16f1784)
You might want to 'do the math' or actual board level testing of slow clock speed vs fast clock speed with sleep mode.

While the faster clock ( 500* faster) does consume more current, since operati ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Thu Sep 29, 2016 9:09 am   Subject: Using a FVR for the ADC (pic16f1784)
I have to ask WHY are you tunning the PIC so sloooooooooooow ??
All operations, especially the floating point math will take forever..

Not seeing what else you do in the program but over the past ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Thu Sep 29, 2016 7:10 am   Subject: Using a FVR for the ADC (pic16f1784)
setup_adc_ports(sAN7|VSS_FVR); // Note: I also tried (sAN7,VSS_FVR)
It absolutely must be as shown below, for it to work:
setup_adc_ports(sAN7, VSS_FVR);
Also, this is how the 16F1784. ...
  Topic: Using a FVR for the ADC (pic16f1784)
qoou

Replies: 22
Views: 74237

PostForum: General CCS C Discussion   Posted: Wed Sep 28, 2016 10:13 pm   Subject: Using a FVR for the ADC (pic16f1784)
PIC16F1784
I'm using an ADC to read temperature, and display it on an LCD.

setup_adc_ports(sAN7);
setup_adc(ADC_OFF);
..
..
setup_adc(ADC_CLOCK_INTERNAL); // Turn on ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group