Hy guys.
Iīm trying to build a little counter to count pulses of varying speed from nil to 120Hz.
YEEES it will be a tripmaster speedo someday.
Tried that with "count" and it works so far, but looses pulses of course and I need every, at least 99,9% of these.
So I tried to get into DTs interrupts and Iīm falling on my face (hurts of course)
because I dunno where to start. Tried "Hello World", "Blinky Light", wont do.
So I thought its because of the missing definitions and tried some....wont do
all I get after compiling is the error:
ERROR: Variable wsave3 position request 416 beyond RAM_END 335.
I got Microcode studio 3.0.0.5, picbasic pro 2.50 C
heres my code (stolen from DT of course)
Code:'**************************************************************** '* Name : ElapsedtimerDT1 * '* Author : Darrel Taylor * '* Notice : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 25.04.2010 * '* Version : 1.0 * '* Notes : 16F628A, 4mhz , donīt care about correct timing * '* : * '**************************************************************** '* Date : Jan 10, 2006 * '* Notes : This is a simplistic demo of the Elapsed Timer * '*************************************************************** define LOADER_USED 1 define OSC 4 ' Define LCD connections DEFINE LCD_DREG PORTA ' LCD Data Port DEFINE LCD_DBIT 0 ' Starting Data Bit DEFINE LCD_RSREG PORTA ' Register Select Port DEFINE LCD_RSBIT 4 ' Register Select Bit DEFINE LCD_EREG PORTA ' Enable Port DEFINE LCD_EBIT 5 ' Enable Bit DEFINE LCD_BITS 4 ' Data Bus Size DEFINE LCD_LINES 2 ' Number of Lines on LCD ADCON1 = 7 ' Set portA outputs to Digital / No ADC 'CMCON = 7 LCDOUT $FE,1 ' Initialize LCD PAUSE 200 include "DT_INTS-14.bas" INCLUDE "ReEnterPBP.bas" INCLUDE "Elapsed_INT.bas" ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ClockCount, PBP, yes endm INT_CREATE ; Creates the interrupt processor INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts ENDASM Gosub ResetTime ' Reset Time to 0d-00:00:00.00 Gosub StartTimer ' Start the Elapsed Timer Main: if SecondsChanged = 1 then SecondsChanged = 0 LCDout $FE,$C0, dec Days,"d-",dec2 Hours,":",dec2 Minutes,":",dec2 Seconds endif GOTO Main
maybe its about compiler version or something.
any suggestions beyond cry me a river?
regards Mugelpower





Bookmarks