Home www.visualprog.cz

  

 

KV04 , Z8F6422 and CAN bus project

 15.05.2010  start of date 

Email Kontakt .

Pro více informací je zde formulář

(c) 2010 Pavel Pindora 

 
No d.

 

Hardware
30.05.2010 FREQUENZ · Spectrum analysis

25.7.2010 CAN analysis

 

KV04 - Hardware

 

                       

 

Z8 Encore Development Kit  http://www.zilog.com/products/partdetails.asp?id=Z8F64200100KIT
MCP2515 SPI CAN bus controler http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010406
82C250 CAN Transceiver 1Mb http://www.semiconductors.philips.com/acrobat_download/datasheets/PCA82C250_5.pdf

CAN  schemes
MCP2512

 

MCU Z8F 

 

CAN topology 

SPI
config

#define PHASE_ONE 0x10 //0x10

#define CLK_POLSET 0x08 //0x08

#define CLK_POLRST 0x00 //0x00

#define MMEN_MASTER 0x02

#define OPEN_DRAIN 0x04

#define SPI_ENABLE 0x01

 

SPICTL = PHASE_ONE | CLK_POLRST | MMEN_MASTER | SPI_ENABLE ;//| OPEN_DRAIN;

 

Example : Get interrupt flag ( CANINTF address 0x2C )

 

void WhileFunction( void ) in S04_SYSTEM.C

...

INTFlags = read_MCP(CANINTF);

...

 

read_MCP in SPI.C

unsigned char read_MCP(unsigned char adress)

{

unsigned char spidata;

SET_SS_LOW

SPI_Write_SSlow( READ_MCP ); // Read Command

spidata = SPI_Read_SSlow ( adress,0xAA); // 0xAA Shift only 

SET_SS_HIGH

return (spidata);

}

 

SPI Interface - signals MOSI, CLK only, send command,address,shif to MOSI

 

 

FREQUENZ · Spectrum analysis  ;o))))))

KV04 - Power off , center 71 MHz

KV04 - SP04 - set

KV04 - Power on , center 71 MHz, Spawn 58MHz

  

KV04 - Power on , center 38,58 MHz, Spawn 115,4kHz

 

CAN analysis

5.byte of CAN data / 1.bit

 
Start CAN analysis. How to :
 

 

This is all , today .

¨