Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
Zoltan PERES dr.
peres

posted on 2014/02/15 07:35:59 PM CET

Audio & Speech

SPI Communication with multiple devices

Hello Everyone,
I'M new here so don't exactly know how this request-process works...

My problem is:
I have to buuild a 6 channel thermocoulpe data logger, with USB HID comm. I work in mikroB Pro Environment on EasyPIC v7 board with the original 45K22 proc. For this purpose I bought a ThermoClick panel which works fine in the above environment. But because of the need of USB I Changed the proc to a 45K50 one. That's the point where the problems began.

1st:
The 45K22 and the 45K50 have different pinouts for SPI. The built-in SPI library does not provide any possibility to change the pins from code. How can I use the orginal sample code as a starter and apply it for the 45K50?

2nd: If I want to use several slaves (not with Daisy-chain) I'll have to use different SS-lines for each. How to change the SS-pins from code runtime?

Any help or idea would be very useful.
Thanx in advance....
Reg: z. peres