1280 SPI CS

Discussion specific to the ZX-1281 and ZX-1280 microcontrollers as well as the ZX-1281 and ZX-1280 Dev Boards.
Post Reply
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

1280 SPI CS

Post by pjc30943 »

There are no dedicated CS pins for SPI on the 1280 as there were on the 1281ae, right? It's not clear whether the 1280/1 requires them fixed in hardware, or if on the 1281ae the pin was just a designation for convenience.

EDIT: clarification: there is support for 4 HW ports, but only one defined CS is included. This actually is exactly the same, then, as the 1281. The (new) question is whether there's a difference between using user-defined CS pins, and the explicitly reserved CS.
Paul
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

I believe there is no difference. Here is the relevant text from the datasheet:
When configured as a Master, the SPI interface has no automatic control of the SS line. This must be handled by user software before communication can start.
This means the VM must explicitly control the SS line (PB0) and could just as well do this for a user configured chip select pin.
Mike Perks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: 1280 SPI CS

Post by dkinzer »

pjc30943 wrote:the explicitly reserved CS.
The pin that with the SS designation is defined for use as an input when the device is an SPI slave. Any output pin can be used for SS when the device is an SPI master.

Currently, the ZBasic System Library functions do not support slave mode. One could write code for that mode for a native mode device.
- Don Kinzer
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Post by pjc30943 »

Thanks guys; this is clear now.
Paul
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Post by stevech »

was there an issue where the SPI (for any ZBasic product) cannot run at 4MHz (VM issue?)
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

stevech wrote:was there an issue where the SPI (for any ZBasic product) cannot run at 4MHz (VM issue?)
I don't recall any such problem nor do I see any evidence in the change history. Are you seeing a problem?
- Don Kinzer
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

stevech wrote:was there an issue where the SPI (for any ZBasic product) cannot run at 4MHz (VM issue?)
Are you perhaps confused with 8MHz? The SPI bus can only run at a maximum speed of 1/2 clock speed which is of course 7.3828 MHz.
Mike Perks
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Post by stevech »

No SPI issue here.
I'll search the forums to find what I too-vaguely remember about limitations of connecting SPI devices using the VM. Maybe nothing and I'm (again) hosed up.
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Post by Don_Kirby »

The only speed related SPI issue that I can recall is the 25256 vs 25256A issue, with the former not being fast enough.

-Don
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

There was an issue with early versions of the ENC28J60 which had to run SPI at 8MHz or use the same clock for it and the microcontroller. Maybe this is what you were remembering.
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Post by stevech »

Need more vitamin E
Post Reply