CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RTOS in PIC16F1937 not working

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
fernandorodrigues



Joined: 17 Apr 2024
Posts: 1

View user's profile Send private message

RTOS in PIC16F1937 not working
PostPosted: Wed Apr 17, 2024 3:01 pm     Reply with quote

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();
}
temtronic



Joined: 01 Jul 2010
Posts: 9121
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 17, 2024 4:43 pm     Reply with quote

Proteus is busted !
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group