Page 1 of 1

Need guidance

PostPosted: Mon Oct 11, 2010 9:29 am
by bradg
Hello,

I've been working (and attempting to work) with Salvo for PIC16 and 18 for a couple weeks now, and find that I need some guidance on wether it will be the right solution for me going forward.

My two intended target processors are a PIC18F87J11 and PIC16F1938 (two different projects), both of which will require a regular system timer (10mS or so resolution) and possibly an external interrupt.

My current development environment consists of MPLAB 8.56, MCC18 3.36, PICC 9.80 and PICC18 9.63. None of the C compilers have been purchased, currently running in "lite" mode, as well as using Salvo 3.2.3 "lite" with patches A through E applied to familiarize myself with it.

I have been running into significant issues attempting to get a timer overflow interrupt system to function, and to date have only been able to get even the simplest non-interrupt enabled Salvo-enable project to compile and run under MCC18 - PICC(18) simply locks up, having to kill the task from task manager.

I have no issues with purchasing Salvo and/or one or both of the compilers (based on recommendation), but I really would like to know with some certainty that it will work in the development environment with the target(s) I have in mind, and if necessary, how to work out the timer interrupt issues I'm having.

Thanks in advance!


Brad

Re: Need guidance

PostPosted: Mon Oct 11, 2010 10:05 am
by aek
Hi Brad.

1. Salvo for PICmicro MCUs (v3.x is the latest) is not compatible with the v9.xx and later "PRO" versions of the HI-TECH PIC-oriented compilers. These are the ones with "omniscient code generation". Looking at our website, I see that this is not obvious -- will update the website to reflect this ASAP.

2. Salvo for PIC works fine with MPLAB-C18 -- apart from the restriction that tasks should not have any local (auto) variables in them. All task-scope variables should be declared as static. This restriction is unique to Salvo + MPLAB C18.

3. Generally speaking, the kind of runtime problems you describe are due either to a WDT firing, or an invalid Salvo configuration (e.g. creating four tasks when OSTASKS is still set to 3). My bet -- especially with Microchip parts -- is that the WDT is still enabled, and you're getting hit by it at some time into the app. The simplest way to verify this is to place a breakpoint early in main () (e.g. at the call to OSInit()), and ensure that this breakpoint is only met once. Easy to do / check in MPLAB SIM.

Post a minimalist sample of your code, and I can check it out. Need to see the *.c, any *.h, and salvocfg.h.

Note that MPLAB-C18 being compatible with Salvo doesn;t help you with the PC16-based project. An older version of HI-TECH's PICC compiler would be one solution -- dunno if HI-TECH offers that.

--Andrew