cancel
Showing results for 
Search instead for 
Did you mean: 

ST7lite29 with STICK programmer

bleumers_j
Associate II
Posted on April 04, 2003 at 12:32

ST7lite29 with STICK programmer

5 REPLIES 5
bleumers_j
Associate II
Posted on April 02, 2003 at 06:30

Hello,

I'm trying to program a s19 file into a ST7lite29 with a stick. The program seems to be in the chip (verifies OK).

But it won't run after disconnecting the stick. I'm sure the program itself is ok.

I think the clock is the problem. I use the internal RC clock. I've tried a lot of things, but no one helped.

Has anybody an idea?

Thanks,

Johan.

[ This message was edited by: joble on 04-04-2003 10:50 ]
stephanie
Associate II
Posted on April 04, 2003 at 07:22

Try to do a reset after disconnecting the STICK. Try to modify the code with something simple (output the clock on MCO pin for instance) to see if it works or not.

bleumers_j
Associate II
Posted on April 04, 2003 at 08:09

Hello,

Ok, a simple program, which only makes all outputpins hi, seems to run on the st7. A breaktrough

But my next question...

Why does my program runs fine on the EMU3 emulator and does not after programming into the ST7.

It's a program with 3 PWM's running simultanously. The duty cycle is modified by the main program.

It's a C program compiled with cosmic.

I'll try to experiment with the program by taking away parts of the code, and hope to find the problem this way...

Johan.

[ This message was edited by: joble on 04-04-2003 11:40 ]

bleumers_j
Associate II
Posted on April 04, 2003 at 09:53

Hello again,

Again a little bit closer to the solution...

The only outputs are 3 PWM signals. And for a reason the PWM doesn't work. So nothing happened after starting the program.

Any idea's whats wrong???

This is a part of the C source code

init:

-----

DCR0L=0x00; //PWM0

DCR1H=0x00; //PWM1

DCR1L=0x00; //PWM1

DCR2H=0x00; //PWM2

DCR2L=0x00; //PWM2*/

PADDR=0x1F; // Define PA0

A4 as output

PAOR=0x1F; // and push pull

PBDDR=0x0F; // Define PB0

B2 as input

PBOR=0x0F; //

TRANCR=0x00; //

ATCSR=0x18;

ATRH=0x00; //Frequentie

ATRL=0x00; //Frequentie

PWMCR=0x55; //All PWM's on

later on in the program:

------------------------------

DCR0H=0x0f; //PWM0

DCR0L=0xff; //PWM0

DCR1H=0x0b; //PWM1

DCR1L=0xff, //PWM1

DCR2H=0x04; //PWM2

DCR2L=0xff; //PWM2

TRANCR=0x01;

Johan.

bleumers_j
Associate II
Posted on April 04, 2003 at 12:32

Problem is solved!

The clock of the timer was chosen 32MHz. On the EMU3, this was no problem.

In the ST7 itselves, this clock should be chosen fcpu.

Johan