Hi Green,
[quote user="Green Youss"]1- the SYNC pin of the DAC , to which pic pin's should be connected ??[/quote]
This is something you may have to double check with Microchip. SYNC can be assigned to any general use digital I/O pin. In page 197 of the PIC18F2550 datasheet, in the description of register SSPCON1 it is mentioned that if you program the SSPM3:SSPM0 bits to 0101 you can use the SS pin as I/O. Maybe you can use this or another I/O pin to control SYNC.
SYNC must be pulsed before a transmission.
- It must be brought HIGH and then LOW before a transmission starts.
- The update of the DAC output is not dependent on SYNC.
A simple way to implement this is to:
- Keep SYNC HIGH while idle.
- Bring SYNC LOW before a transmission.
- Bring SYNC HIGH after a transmission.
[quote user="Green Youss"]2-for th Din of the DAC should it be connected to RX or to SDI ??[/quote]
The DIN (Data In) pin of the DAC should be connected to the SDO (Serial Data Out) of the PIC. This is indeed the RX pin.
Hopefully this helped you. Let me know if you need anything else.