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 18 matches
CCS Forum Index
Author Message
  Topic: USB not recognised by computer
BM92

Replies: 1
Views: 5730

PostForum: General CCS C Discussion   Posted: Wed Jan 29, 2014 1:46 pm   Subject: USB not recognised by computer
I am using a PIC32MX795F512L in device mode but cannot get it to connect.

So here is a step by step of what is happening to aid with any help people can give.

Before i attach USB cable:

...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Wed Nov 06, 2013 5:35 pm   Subject: FIFO queue
I can confirm that after testing my code works as is needed. After a few minor tweeks to it. This mean it will replace the oldest piece of data with a new piece of data.

The array is used for a PI ...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Mon Nov 04, 2013 4:09 pm   Subject: FIFO queue
The reason for this method is because the specific application i am using my code for is not a standard one and must be done in this way. I will not go into details but there are more than one process ...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Mon Nov 04, 2013 3:17 pm   Subject: FIFO queue
After looking at the usage i need for my code i have realised that i do not need to take any data out as i am simply keeping this array to take an average of values that are stored. Therefore i can ju ...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Mon Nov 04, 2013 2:44 pm   Subject: FIFO queue
First, don't use % BUFFER_SIZE

This only works efficiently with 'binary' buffer sizes (1,2,4,8 etc.). Otherwise it has to code as a division, which is slow. This is a limitation that is not documen ...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Mon Nov 04, 2013 1:52 pm   Subject: FIFO queue
Thanks asmboy. Smile

I'd do a wiki search on circular buffers.
It really is vital to change the way you think....

Key is that reading a byte in an array on a PIC, is quite inefficient. Typically t ...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Mon Nov 04, 2013 9:49 am   Subject: FIFO queue
Im not sure i entirely understand the code above. I am looking for a simple way to fill and array with data. Once full i want the oldest piece of data to be removed and a new piece of data to be added ...
  Topic: FIFO queue
BM92

Replies: 14
Views: 17028

PostForum: General CCS C Discussion   Posted: Mon Nov 04, 2013 6:58 am   Subject: FIFO queue
I am attempting to create an array which will take data in and once full remove the oldest piece of data and enter a new piece of data.

I was thinking along the lines of using

int Q[100] ...
  Topic: How to run a PID?
BM92

Replies: 10
Views: 13333

PostForum: General CCS C Discussion   Posted: Tue Oct 22, 2013 3:44 pm   Subject: How to run a PID?
Unfortunately the person for me to contact has not been available due to sickness. so was trying to get as far as possible with the little info i have. Thanks for the response though.
  Topic: How to run a PID?
BM92

Replies: 10
Views: 13333

PostForum: General CCS C Discussion   Posted: Tue Oct 22, 2013 12:32 pm   Subject: How to run a PID?
I currently have not been given the specific purpose of this code as i am new to the project and this is just the "training" if you like.

Its for a scientific project which will be receiv ...
  Topic: How to run a PID?
BM92

Replies: 10
Views: 13333

PostForum: General CCS C Discussion   Posted: Tue Oct 22, 2013 9:44 am   Subject: How to run a PID?
Ok so i have coded a PID using a very good tutorial online. but i am wondering what iis the best way for me to use it.

Am i able to leave the function outside of the main loop and call the function ...
  Topic: ADC to SPI communication
BM92

Replies: 16
Views: 25539

PostForum: General CCS C Discussion   Posted: Tue Oct 22, 2013 7:37 am   Subject: ADC to SPI communication
Thanks for all the help and advice. I managed to get the PIC and ADC to work. It turned out to be a relatively simple piece of code to initialize it. I do however have another question.
  Topic: ADC to SPI communication
BM92

Replies: 16
Views: 25539

PostForum: General CCS C Discussion   Posted: Sun Oct 06, 2013 5:52 am   Subject: ADC to SPI communication
Thanks for the help.

If i am using a SPI slave, framed slave setup would the synchronisation pulse be sent automatically when data is being sent or do i have to code a synchronizing pulse to happen ...
  Topic: ADC to SPI communication
BM92

Replies: 16
Views: 25539

PostForum: General CCS C Discussion   Posted: Fri Oct 04, 2013 4:18 pm   Subject: ADC to SPI communication
I was looking at this some more, and I realized the ads1601 is the master.
It produces SCLK, DOUT, and FSO. So the 24F PIC must be the slave.

In the MSSP section of the 24FJ128GA010 data sheet, ...
  Topic: ADC to SPI communication
BM92

Replies: 16
Views: 25539

PostForum: General CCS C Discussion   Posted: Fri Oct 04, 2013 1:11 pm   Subject: Re: ADC to SPI communication

The PIC i will be using will be a slave. WIll the following code initialize the external ADC or the internal:

void initADC( int amask)
{
AD1PCFG = amask;
AD1CON1 = 0x00E0; ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group