cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent : I search help for I/O activation of the PSD family

bernard23
Associate
Posted on April 22, 2004 at 11:14

Urgent : I search help for I/O activation of the PSD family

2 REPLIES 2
bernard23
Associate
Posted on May 17, 2011 at 12:00

Hy,

I use a PSD853F2 (PSD8XX family) with a µC 80C552 (Philips).

I would like to know, how we program the VM register in CSIOP to activate the I/O output (bit eight of VM register ).

My simple program is :

#pragma OPTIMIZE(5,SPEED)

#pragma DEBUG

#pragma SYMBOLS

#pragma CODE

#include

#include

#include

#include

#define XBYTE ((char *)0x20000L)

#define CSIOP 0x200 /* Control register Adress PSD 8000-80FF */

#define CPORTA 0x8002 /* Control Port A */

#define DRPORTA 0x8006 /* Register Direction Port A */

#define DOPortA 0x8004 /* Data Out Port A */

/* ......MAIN.......*/

void main(void)

{

int xdata *z;

int xdata y;

int xdata *p;

int xdata *pt;

/*.........Initialisation de la RS232 9600 Bauds 8 bits 1 bits de Stop No Parity ......*/

S0CON=0x52;

TMOD=0x20; /* Compteur 8 bits … rechargement */

TCON=0x61; /* 0xfd-> 9 600Bd/s */

TH1=0xFD; /* Smod=1 ddl de la frequence de communication 19 200 bd/s */

/*..... Programmation Port A du PSD ........*/

p=CSIOP;

*p|=128;

z=CSIOP;

y=*z;

printf(''lecture register VM = %x\n'',y);

}

When I'read the VM register, it give not the data I program. I read this data e2e2 or 1 or 1212 ........???????

I use psdSOFT EXPRESS AND jtag BUS for the mapping memory

Thank you very much for your precious help.

Best regard

Chrystophe :

mailto:bernard@enic.fr

FRANCE

[ Ce message a ete modifié par : : chrystophe on 21-04-2004 14:17 ]
sbencke3
Associate II
Posted on May 17, 2011 at 12:00

There are some problems here !

First in CSIOP you have 256 different registers, when you make CSIOP = 0x200, you are given an adress just for the first register (Data In, see page 105 of manual) if you want to access the VM register you need to plus an offset (0x200 + 0xE2, for this register).

I suggest you to use the include file upsd3200.h given by ST and take a look in the example code number 1.