Hey Henkvan, I'll try to reply to your SPI comments.

>  I do not think that for the sw version master/slave mode has to be
> defined as it is only a setting for the SPI hardware in the PIC's. I
> hoop that I understood your remark correct.
> My aim is a pair pair of SPI_master divers that are can be exenged in
> an application without updating calls.
> This is like the pair for I2C_master .. in JALLIB.

I still think master/slave must be defined in SPI software. SPI always
has one master and many slaves. SPI never has two masters, does it? If
I'm wrong, can you show me some documentation?

The master controls the clock and chip select line, the slave listens
to the clock and chip select line.

If you wish for your slave to do other things while waiting for the
master to send/request data, you may need to use an interrupt + queue/
buffer. A interrupt on change pin would be perfect for SPI software.

> You are right, for the hardware version the mode and speed must be
> set, Master mode can be set in the init procedure

You must also set SPI mode in SPI software. This will define the clock
polarity during idle state, which is important. TWO SPI modes are
alike with SPI software, the other two are not.

> and for Speed, I wish for an extra procedure that can be called after
> Init to change the speed setting.

I agree that you should be able to set mode and speed without using
the init procedure again. William seems to disagree?

Some devices require a lower speed for commands, and a faster speed
for data. Some devices use different modes, and you may be using more
the one device (with different modes) so you need a way to switch
between modes.

SPI software should act the same as SPI hardware as much as possible,
that way it is easy to switch between the two.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to