llevat problema de programació

B

Brutus

Guest
Crear aquest programa, excepte en virtut de 2.2:
#
Include <salvo.h>
#
Include <pic.h>
/ / # Define TASK1_P OSTCBP (1)
/ / # Define TASK2_P OSTCBP (2)
_OSLabel (TaskCount1)
_OSLabel (TaskShow1)
_OSLabel (TaskShow2)
_OSLabel (TaskCount2)

unsigned int counter = 0;

TaskCount nul (void)
(
/ / OSSetPrio (1, TaskShow1);
for (;

<img src="http://www.edaboard.com/images/smiles/icon_wink.gif" alt="Wink" border="0" />

(
PORTA PORTA ^ = 0x01;

OS_Yield (TaskCount2);
)
)TaskShow nul (void)
(

/ / OS_SetPrio (1, TaskCount1);
for (;

<img src="http://www.edaboard.com/images/smiles/icon_wink.gif" alt="Wink" border="0" />

(
PORTB = PORTB ^ 0x01;
OS_Yield (TaskShow2);
)
)void main (void)
(
ADCON1 = 0b00000111;

TRIS = 0x00;
TRISB = 0x00;
PORTB = 0x00;
PORTA = 0x00;
/ / T0CS = 0; / /
/ / T0IE = 1 / /

/ / InitializeMultitasking ();
OSInit ();
OSCreateTask (TaskCount, OSTCBP (1), 3);
OSCreateTask (TaskShow, OSTCBP (2), 2);
/ / OSStartTask (1);
/ / OSStartTask (2);
for (;

<img src="http://www.edaboard.com/images/smiles/icon_wink.gif" alt="Wink" border="0" />OSSched ();
)
el LED d'PORTA
doesnt treball per què?
no hi ha commutació entre la tasca
gràcies per la seva resposta

 
La versió 2.2 té problemes amb l'establiment de prioritats (com ja he descobert a mi mateix).
Definir tasques i prioritats de la igualtat amb què ha de treballar.
traça

 
També aquí:
http://www.pumpkininc.com/cgi-bin/Ultimate.cgi?action=intro

Aquest és el fòrum d'usuaris de llevat potser alguns pot answer allà.

salutacions cordials

 
He tingut alguns problemes amb les prioritats que en el punt 2.2.

Jo ús mateixa prioritat per a tots excepte per a una tasca molt important tasca que he de fer per establir un major prioritat, amb aquesta everythin funciona bé.

NeuralC

 

Welcome to EDABoard.com

Sponsor

Back
Top