|
|
View previous topic :: View next topic |
Author |
Message |
Steve Byrne Guest
|
SPI Routine and Version 4 compiler. |
Posted: Thu Aug 24, 2006 6:22 pm |
|
|
In V4 of the compiler can the SPI function be used to clock out more
than 8 bits of data at a time from the SPI port.
I was looking in the new manual but I did not see a specific mention
of this.
What I would like to be able to use the spi port for is clocking out
say 24bits, or 16bits or 5 bits etc.
spi_write(0xFFFFFF); //write 24 bits to SPI device
Does anyone know if this is now possible with the v4 compiler.
Thanks Steve. |
|
|
Ttelmah Guest
|
|
Posted: Fri Aug 25, 2006 2:35 am |
|
|
Multiple parts to this.
When using the hardware SPI, you are limited to what the hardware can do. Hardware SPI transactions, handle 8bits. You can string multiple 8bit transactions together to give 16bit, or 24bit transfers. (you can already do this, by simply stringing together multiple 8bit transfers). However you cannot do a 5bit transfer on the hardware.
There is now a 'software SSP' library, and this can handle different word lengths.
Now whether you consider V4, to be likely to be 'useable' in the near future, is down to how optimistic you are. The IDE, seems to be improving. The releases released a few weeks ago, were awful. The step from V4.004, to 4.005, seems to have fixed the IO error, allowing code to be recompiled after changes, and the compiler now integrates reasonably well to MPLAB. Several of the new features, just don't work at all yet. I have built my own 'test' program, which uses perhaps 3/4 of the new features (variable length constant strings, pointers to constants, addressmod etc. etc..). With 4.004, it compiled without complaint for the first time, and I'd say that the compiler does now seem to work for much of the old V3 code. The new features seem now to be 'near' to beta useability, but few yet work without bugs...
Best Wishes |
|
|
Guest
|
|
Posted: Sun Aug 27, 2006 8:31 pm |
|
|
Ttelamh thanks for an honest opinion.
I got the blurb in the mail from CCS and was considering a upgrade
hence my question on the SPI inbulilt routine.
I think in the interm though I may just be better off bit banging data
out.
thanks.. Steve |
|
|
|
|
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
|