Well for now I have been able to start the SD card from the module (AT commands).<br><br>// open SPI channel<br>AT^SSPI=1010,0000,0000,0000,0000<br><br>// in data mode: initialize SD card<br>&lt;a000008400000000095&gt;<br>
<br>It seems to be possible to start the card (i&#39;m getting on stuff on the data out of the SD card), but I&#39;m not sure I can proceed further. How should I change (possibly) the state of that CS card (if I could !) ?
<br><br>Thanks<br><br>Romain<br><br><div><span class="gmail_quote">2007/10/18, Marcin Mazurek &lt;<a href="mailto:mmazure2@wp.pl">mmazure2@wp.pl</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Well, here is some code snippets which I use to communicate from TC65 to<br>ATMega with SPI:<br><br>Open SPI channel:<br>AT^SSPI=1010,0000,0000,0000,0000<br><br>this is SPI channel in mode 0 on 250 kbps.<br><br>Now You have to open input and output stream:
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream atOs = atCmd.getDataOutputStream();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InputStream atIs = atCmd.getDataInputStream();<br><br>After that, You have open SPI channel with streams to which You can<br>write and read from.
<br>That should be enaugh to communicate with any SPI device, but with SD<br>card is one problem.<br>When you want to initialize SD card, you have to change the state of CS<br>line, and when You open SPI channel, You cannot controll CS line.
<br>Thats what I know. I hope this will help You.<br>And I hope You&#39;ll chare your experience with TC65 and SD card. Let me<br>know, if You&#39;ll have any problem.<br><br>Best regards<br>Marcin Mazurek<br><br><a href="mailto:dev65-request@castrov.cuug.ab.ca">
dev65-request@castrov.cuug.ab.ca</a> pisze:<br>&gt; Send dev65 mailing list submissions to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:dev65@castrov.cuug.ab.ca">dev65@castrov.cuug.ab.ca</a><br>&gt;<br>&gt; To subscribe or unsubscribe via the World Wide Web, visit
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65">http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65</a><br>&gt; or, via email, send a message with subject or body &#39;help&#39; to<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:dev65-request@castrov.cuug.ab.ca">dev65-request@castrov.cuug.ab.ca</a><br>&gt;<br>&gt; You can reach the person managing the list at<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:dev65-owner@castrov.cuug.ab.ca">
dev65-owner@castrov.cuug.ab.ca</a><br>&gt;<br>&gt; When replying, please edit your Subject line so it is more specific<br>&gt; than &quot;Re: Contents of dev65 digest...&quot;<br>&gt;<br>&gt;<br>&gt; Today&#39;s Topics:<br>
&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;1. Siemens TC65 Platform and SPI (Romain Farkas)<br>&gt;<br>&gt;<br>&gt; ----------------------------------------------------------------------<br>&gt;<br>&gt; Message: 1<br>&gt; Date: Thu, 18 Oct 2007 15:49:24 +0200
<br>&gt; From: &quot;Romain Farkas&quot; &lt;<a href="mailto:romain.farkas@epfl.ch">romain.farkas@epfl.ch</a>&gt;<br>&gt; Subject: [dev65] Siemens TC65 Platform and SPI<br>&gt; To: <a href="mailto:dev65@castrov.cuug.ab.ca">
dev65@castrov.cuug.ab.ca</a><br>&gt; Message-ID:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:87a7df4f0710180649t270fb0a5n77355575393a3819@mail.gmail.com">87a7df4f0710180649t270fb0a5n77355575393a3819@mail.gmail.com</a>&gt;<br>&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;
<br>&gt;<br>&gt; Hello,<br>&gt;<br>&gt; I&#39;m looking for a code snippet using the AT^SSPI command to configure a<br>&gt; device on the SPI bus. We&#39;re trying to implement a SD card reader on the<br>&gt; Siemens Wireless platform.
<br>&gt;<br>&gt; Many thanks,<br>&gt;<br>&gt; Romain Farkas<br>&gt; -------------- next part --------------<br>&gt; An HTML attachment was scrubbed...<br>&gt; URL: <a href="http://castrov.dyndns.org/pipermail/dev65/attachments/20071018/478c1e29/attachment-0001.htm">
http://castrov.dyndns.org/pipermail/dev65/attachments/20071018/478c1e29/attachment-0001.htm</a><br>&gt;<br>&gt; ------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; dev65 mailing list
<br>&gt; <a href="mailto:dev65@castrov.cuug.ab.ca">dev65@castrov.cuug.ab.ca</a><br>&gt; <a href="http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65">http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65</a><br>&gt;
<br>&gt;<br>&gt; End of dev65 Digest, Vol 4, Issue 1<br>&gt; ***********************************<br>&gt;<br>&gt;<br>&gt;<br><br><br>_______________________________________________<br>dev65 mailing list<br><a href="mailto:dev65@castrov.cuug.ab.ca">
dev65@castrov.cuug.ab.ca</a><br><a href="http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65">http://castrov.dyndns.org/cgi-bin/mailman/listinfo/dev65</a><br></blockquote></div><br>