On Fri, Jul 9, 2010 at 3:42 PM, Luisa <[email protected]> wrote: > Hi Sebastien, > > It seems I have to wait for a week or so till the crystal arrives. > Though I'm also sure one can get advantage on the hardware usart to > get things done and it's the way to go. > > However, been testing this "by hand" now that I had some spare time at > 1Mhz, with no success so far (I've got the impression I won't have it > either when the crystal arrives and I setup the hardware accordingly, > because of the problem here being some other that I can't see). > > What I'm doing now, with a 20Mhz clock on the chip, instead of the > original 18Mhz one: > > * I setup the card's clock line to toggle each 10 cycles, hence giving > me a full-swing 1Mhz signal on the output pin, though I don't yet let > it toggle.
20Mhz / 10 = 2Mhz, not 1Mhz. Though the cart should work fine for all frequencies between 1Mhz and 5Mhz, I suggest you to use 1Mhz for the beginnig. > > * I activate the contacts appropiately, including the card's clock line. > > * Just after I activate the contacts, no interrupts or whatsoever, I > just fall into a loop where I sample 80 bits on the i/o line each +/- > 372 uS (have also tried with more and less, though this time the card > actually sends bytes as expected, each +/- 372uS). If you are clocking your card with 2Mhz, you should not sample at 372uS. Again, the formule is : initial ETU = 372 / Fcard_clock. For 1Mhz, initital ETU = 372 uS. For 2Mhz, initial ETu = 372 / 2 = 186 uS. BR, Drasko _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
