Re: SPI bus problems with PIC microcontroller



On Apr 17, 3:19 pm, "John Speth" <johnsp...@xxxxxxxxx> wrote:
I am using PIC18F6410 and interfacing it to Linear technology's
LTC2704 ( 16 bit DAC ).

I am checking the data signals on the SDO pin ( MOSI pin of theSPI
bus) using a USB based Logic Analyzer.

When the pins of the Logic Analyzer are attached to the SDO pin, the
DAC is able to recognise theSPIcommand and acts accordingly, but
when I remove the logic analyzer connections, the DAC doesn't
recognise theSPIcommands and acts like it is dead.

The voltage ouput on the pins of this logic analyser is about 1.157V
( between logic analyser pin and its GND pin).

Is there any fuse setting I am missing ? Is there any clock speeds
that I need to look into. I am running the PIC microcontroller at
20Mhz at present. Please help.

Maybe you have a voltage mis-match at the interface. Check the data sheets
for voltage requirements.

Maybe you have a line termination problem. Try using a pull up or pull down
resistor. Try using a cap to simulate the logic probe. Then try to
understand the differences.

Maybe your DAC can't take clocks at the rate you're driving it. Check the
data sheets for clock requirements.

Try using a multichannel scope to look at the signals. A logic analyzer
doesn't show you the situation in the analog domain. You might see
overshoot, ringing, or slow edges that you can't see with a logic analyzer.

JJS

Hello John,

1) I checked the Datasheets of the Microchip part and also for the
DAC. I am running the PIC chip at 5V DC, and the DAC is running at
+15V, -15V for analog and the digital supply is +5V. So I guess the
digital voltage supply in both cases is +5V DC.

2) I also tried with many pull up resistors ( 10K, 4.7K and 2.1K ) ---
no difference. The DAC doesnt recognise any commands on the SPI bus
with fosc/16 as my SPI clock.

3) Then I tried pull down resistors ( 10K, and 4.7K ) and same result
-- the DAC behaves " dead".

4) I tried clocking the SCK pins at different frequencies, like fosc/
4, fosc/16 and fosc/64 and still no result. The DACs SCK frequency
according to datasheets is 40Mhz max. My clock frequency ( fosc ) is
just 20 Mhz. I generally run the SCk clock at fosc/16.

I haven't tried with in-line series resistors and havent checked with
the oscilloscope yet.



.



Relevant Pages

  • Re: SPI bus problems with PIC microcontroller
    ... DAC is able to recognise theSPIcommand and acts accordingly, ... when I remove the logic analyzer connections, the DAC doesn't ... data sheets for clock requirements. ...
    (comp.arch.embedded)
  • Re: SPI bus problems with PIC microcontroller
    ... DAC is able to recognise theSPIcommand and acts accordingly, ... when I remove the logic analyzer connections, the DAC doesn't ... recognise theSPIcommands and acts like it is dead. ...
    (comp.arch.embedded)
  • Re: SPI bus problems with PIC microcontroller
    ... DAC is able to recognise the SPI command and acts accordingly, ... when I remove the logic analyzer connections, the DAC doesn't ... recognise the SPI commands and acts like it is dead. ...
    (comp.arch.embedded)
  • Re: Voltage ramp (was: Low current source)
    ... >> Why not just use a DAC, and vary the clock rate, to generate your ... >A uC and a DAC is a possible solution; in fact I just spent a while poking ... >First, I want separate rates for ramp up and ramp down, so I can't just vary ... I want the rates settable by trimpots. ...
    (sci.electronics.design)
  • Re: Valve fraud?
    ... clock rate on the data. ... DAC design's still a bit of a black art, ... how does analogue voodoo find a way back in? ... Of course adding a small buffer between the shift register and the ...
    (uk.rec.sheds)