fernandorodrigues
Joined: 17 Apr 2024 Posts: 1
|
RTOS in PIC16F1937 not working |
Posted: Wed Apr 17, 2024 3:01 pm |
|
|
Hi, sorry for my English.
I'm trying to use the RTOS on the PIC16F1937, I made a simple code for an LED to blink, but nothing happens, neither simulating in Proteus, nor burning in the physical IC.
If I don't use the RTOS and make the LED blink inside the main with while, it works normally.
I've already tested the RTOS code on the PIC16F886 and it works.
I'm using CCS 4.114
A warning appears in Proteus when I try to simulate:
[PIC16 CORE] PC=0x0043. Indirection address (0x0000) for INDF0 register is itself an indirection register - zero returned. [U1] @0.000126500s
[PIC16 CORE] PC=0x0043. Indirection address (0x0000) for INDF0 register is itself an indirection register - no write occurs. [U1] @0.000126500s
[PIC16 CORE] PC=0x004C. Indirection address (0x0000) for INDF0 register is itself an indirection register - zero returned. [U1] @0.000131000s
[PIC16 CORE] PC=0x004C. Indirection address (0x0000) for INDF0 register is itself an indirection register - no write occurs. [U1] @0.000131000s
Can anyone tell me why?
Code:
Code: |
#include <16F1937.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES PUT //Power Up Timer
#FUSES MCLR //Master Clear pin enabled
#FUSES PROTECT //Code protected from reads
#FUSES CPD //Data EEPROM Code Protected
#FUSES NOBROWNOUT //Brownout disabled
#use delay(INTERNAL=8Mhz)
#use rtos(timer=0, minor_cycle=1ms)
#task(rate=500ms,max=1ms)
void pisca_led(){
output_toggle(PIN_C0);
}
void main()
{
output_low(PIN_C0);
rtos_run();
} |
|
|