Searching \ for '[PIC]: SPI CODE' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/ios.htm?key=spi
Search entire site for: 'SPI CODE'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: SPI Code'
2001\10\29@212105 by David Huisman

flavicon
face
Has anyone here used the SPI code at
http://www.workingtex.com/htpic/Hi-Tech_C_sample_code.htm

I am wanting a piece of bitbashed code to interface with TLC2543 12-bit ADC
convertor.

The code looks fine except the shifting out of data onto the SDO pin seems
to be LSB first, whereas the ADC is set up for MSB first. The recive portion
of the code seems to load LSB first.

Would someone please confirm that this code works as is or whether there is
a typo and shift operator should be "<<" ?

Thanks

Regards

David Huisman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\31@125541 by David Huisman

flavicon
face
Having looked closer at the code snippet in my last post, I notice the
counter "i"
is shifting MS bit first after all, it shifts bit 11, 10 ... 0.
This explains also why Channel data does not need to be completely left
justified, as only 12 bits are shifted out and top 4 MSB are ignored.

Thanks anyway.

Regards

David Huisman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\10\31@125752 by Ned Konz

flavicon
face
On Monday 29 October 2001 06:08 pm, David Huisman wrote:
> Has anyone here used the SPI code at
> http://www.workingtex.com/htpic/Hi-Tech_C_sample_code.htm

Which one? There are three "SPI" things there...

--
Ned Konz
currently: Stanwood, WA
email:     spam_OUTnedTakeThisOuTspambike-nomad.com
homepage:  http://bike-nomad.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]: SPI CODE'
2001\12\08@183844 by Gary silva
picon face
I'm using the PIC16F873. Dose anyone have C code using SPI to control a
24LC01B.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\12\17@111724 by Carlos Ojea

flavicon
face
Hello:

I  am programming a pic18c452 and I want to use the Serial Periphepal
Interface.
Anyone knows where can I find some source code?

Thank you,
Carlos

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\12\17@112209 by Carlos Ojea

flavicon
face
Hello:

I  am programming a pic18c452 and I want to use the Serial Peripheral
Interface (SPI).
Anyone knows where can I find some source code?

Thank you,
Carlos

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\12\17@122809 by chris

flavicon
face
The USART in the 18's is pretty simple to set-up and use. It would probably
be just as fast to read section 15 in the data sheet and write, as it would
be to adapt someone else's little snippet...The best thing about the 18's is
that they are so simple to write for.

Chris

> Hello:
>
> I  am programming a pic18c452 and I want to use the Serial Peripheral
> Interface (SPI).
> Anyone knows where can I find some source code?
>
> Thank you,
> Carlos

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...