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 support@ccsinfo.com

Transmission of data with the MCP3204

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Odracir



Joined: 19 Apr 2010
Posts: 1
Location: Mexico, city

View user's profile Send private message MSN Messenger

Transmission of data with the MCP3204
PostPosted: Mon Apr 19, 2010 10:42 am     Reply with quote

Hi, I'm working with ADC MCP3204 of Microchip but I have some doubts about data transmission. I hope that you can help me.

1. If in the driver MCP3204.c, CLK has a frequency of 20KHz, how I can get the 100ksps of the ADC ? I think that it is impossible, I must change the value of delay_us(50) to delay_cycles(40) (when I'm using a crystal of 4 MHz) to get the 100 ksps ?

2. Assuming that I have achieved, how can I transmit so much information via RS232 ? Or it is impossible?

Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 19, 2010 12:04 pm     Reply with quote

Download the MCP3204 data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/21298e.pdf
On page 3, it lists the maximum SPI CLK frequency as 2 MHz (at 5 volts).

So if software SPI is too slow, then you can use hardware SPI to talk
to the chip, at an SPI clock speed of 2 MHz (or less). There are several
threads in the forum that have hardware SPI code for the MCP320x
series of ADC chips.

You will need to use a PIC that has a hardware SPI module.
For example, the 16F877 and 18F452 have one.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group