Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] 7 Bit Transfer on SPI

Status
Not open for further replies.

arash rezaee

Member level 5
Joined
Sep 10, 2009
Messages
87
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,952
Hi every one

I have a chip which is HMC830 and I need to send 7 bit is SPI mode. I am using ATxmega128 and I know I cannot use SPI from ATXmega because it sends 8 bit in each iteration. So how can I write my own software to have 7 bit?

Regards,
Arash
 

So, if you send an additional dummy bit (hardware SPI) will this be a problem?

The alternative is to use generic I/O pins, one for clock and one for data output (plus the enable output).
If you want read the SPI data from HMC830 then you'll need a data input too.

Refer to bit banging https://en.wikipedia.org/wiki/Bit_banging
 

How did you arrive at this conclusion? SPI is transporting data in 8-bit entities by specification, and as far as I'm aware of there's not a single chip with SPI interface on the market that can't work with bytewise transfer.

Did you read the VCO programming specifications at all? https://www.hittite.com/content/documents/operating_guide/synth_operating_guide_rf_vcos.pdf


I have read it more than you think and I also have evaluation board of HMC830 and I god SDI with CLK and I saw the first data to HMC is 7 bit with 7 CLK and then 3 Bytes of data and at the end just one CLK after a while. On the reference you also mention please go to page A-35 figure 24. you will find it.
 

The data is transferred in multiples of 8-Bit, as required by the SPI specification. The special point is that the 24 bit data is shifted one bit so that the byte boundaries are crossed. That's not particularly user-friendly but can be e.g. handled by copying the data data into a C union and send it byte-wise. Surely easier than programming a non-standard bit-banging 7-bit SPI interface.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top