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

DOS MODULE to PIC interface

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



Joined: 07 May 2007
Posts: 8

View user's profile Send private message

DOS MODULE to PIC interface
PostPosted: Wed May 09, 2007 1:28 am     Reply with quote

I am currently working on a project where i have to save a file in a multi media card using pic. i used the uart connection shown in http://chipdos.com/library/CD17Bxx-0v8.pdf

my problem is, this module doesn't seem to respond.

i used pic16f877 (it is the only pic that i can use in this project, lets say, im "required" to use it no matter what)
my compiler is ccs

any suggestions on the hardware connection?
i also need help in writing the program.
can i use the programs designed for spi interface?

thanks...
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed May 09, 2007 2:23 am     Reply with quote

Quote:
my problem is, this module doesn't seem to respond.
Can you give a bit more information? What have you tried and what are the responses you get? Did you connect all the 4 lines (Rx, Tx, CTS and RTS)?

Best is if you post a small and complete test program.

Just curious, why are you using the UART connection? At the same clock speed a SPI connection can be at least 10x faster than a serial UART. An added advantage is that using the SPI unit in the PIC make the UART available for other uses like communication (for debug) with a PC.
eceeng



Joined: 07 May 2007
Posts: 8

View user's profile Send private message

thanks ckielstra
PostPosted: Wed May 09, 2007 2:51 am     Reply with quote

why uart? i'm a beginner and it seems it is simpler or is it the other way around?

I connect Tx to the receive pin of pic 16f877
I connect Rx to the transmit pin of pic16f877
i connect cts to ground
i leave rts hanging (no connection)

actually i'm just trying to use programs that read data in external eeproms. i'm just curious if it will work on flash memory cards.

can you suggest a test program for this?

i really need help especially on programming


thanks...
your suggestions were such a great help
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

Re: thanks ckielstra
PostPosted: Wed May 09, 2007 3:53 am     Reply with quote

eceeng wrote:
why uart? i'm a beginner and it seems it is simpler or is it the other way around?
SPI uses more wires but is easier as it is a synchronous protocol with a single master. In the UART implementation there are some potential problems waiting in the corner, for example how to set up the baudrate? Also handshaking with RTS/CTS is often a bit problematic as there are hardware buffers in between causing some unspecified delay before the other party is reacting to the flow control. With SPI the protocol is more straight forward, it works or fails.

Quote:
I connect Tx to the receive pin of pic 16f877
I connect Rx to the transmit pin of pic16f877
i connect cts to ground
i leave rts hanging (no connection)
Please mention the pin numbers on both chips. Most likely you will have to connect CTS to Vdd (3V).

What voltage is your electronics running at? Note that the DOSonCHIP has a maximum supply voltage of 3.6V. The PIC16F877 is only specified to run from 4.0V..... Only the 'LF' version is specified to run from voltages as low as 2.0V. You can ue the 'F' version but this requires two different power supply voltages and some 'glue' logic to do the level transformation.

Quote:
actually i'm just trying to use programs that read data in external eeproms. i'm just curious if it will work on flash memory cards.
Sigh... These are completely different things! It sounds like you don't know what you really want to do. Go back to the beginning and tell us what you want to achieve. From there we can help you and point you in the right direction, being it extern eeproms, (flash) memory cards, or something else.
eceeng



Joined: 07 May 2007
Posts: 8

View user's profile Send private message

thanks ckielstra
PostPosted: Wed May 09, 2007 8:41 pm     Reply with quote

i guess i really have to make a further study on memory cards and pic.

thank you very much for your suggestions.
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