Problem with READMEAN in Interrupt

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
sygma22
Posts: 30
Joined: Tue May 27, 2008 1:47 pm
Location: FRANCE
Contact:

Problem with READMEAN in Interrupt

Post by sygma22 » Sun Sep 06, 2009 3:49 pm

In a Interrupt i cant Call a READMEAN because when compiled, All go wrong in my EasyPIC (No LCD Etc....).

Is anybody can Help Me.
My first interest is working with a PWM signal.

Motor : 24 Volts 4 or 5 A.

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Mon Sep 07, 2009 8:01 am

hello
did you thought to save sub context and restore it at leaving the sub?

sygma22
Posts: 30
Joined: Tue May 27, 2008 1:47 pm
Location: FRANCE
Contact:

have tryed to put Save and restore ?

Post by sygma22 » Mon Sep 07, 2009 8:18 am

Hello,

I have tryed to put Save and restore (Like page 46 of guide) with sub routine, but i have the compiler error message on line INTERRUP CLK() => Working register alocation faillure...
sub MOT()

ADC1 = ADC.read(0) ....for example

End sub

Interrupt CLK()

Save(0,MOT)
MOT()
Restore

End Interrupt
My first interest is working with a PWM signal.

Motor : 24 Volts 4 or 5 A.

Post Reply