View previous topic :: View next topic |
Author |
Message |
eceeng
Joined: 07 May 2007 Posts: 8
|
DOS MODULE to PIC interface |
Posted: Wed May 09, 2007 1:28 am |
|
|
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
|
|
Posted: Wed May 09, 2007 2:23 am |
|
|
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
|
thanks ckielstra |
Posted: Wed May 09, 2007 2:51 am |
|
|
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
|
Re: thanks ckielstra |
Posted: Wed May 09, 2007 3:53 am |
|
|
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
|
thanks ckielstra |
Posted: Wed May 09, 2007 8:41 pm |
|
|
i guess i really have to make a further study on memory cards and pic.
thank you very much for your suggestions. |
|
|
|