PDA

View Full Version : DT-ints-18 - new version



dip1
- 10th October 2007, 20:09
Hello, Darrel

I used You new version DT_ints-18 (from 26.08.2007).
I debugged my program with old version DT_ints_18 and all is OK - signal with T=8,192 ms on
portc.0 , but with new version my result not OK - no signal on portc.0 with T=8,192ms, only
mux_on(portc.0)=0.
I used interrupts from taymer 0 with T=8,192ms (f=8mhz, prescaler=64)

My code for pic18f4585 pbp2.47:

define osc 8'HS

INCLUDE "DT_INTS-18.pbp" ; Base Interrupt System
INCLUDE "ReEnterPBP-18.pbp" ; Include if using PBP interrupts


ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?


INT_Handler TMR0_INT, _sub_sensor_led, pbp, yes


endm
INT_CREATE ; Creates the interrupt processor
ENDASM



'taymer_0 4585
symbol regim_taymer_0 = T0CON'
vkl_taymer_0 con %11000101' (PS=64, 8,192ms,8MHZ)

off_taymer_0 con %01000101' %01010101' off
regim_taymer_0=off_taymer_0

regim_digital_port_d con %00000111

symbol mux_on = portc.0' - LED

symbol regim_compar = cmcon'
symbol rs232_tx = portc.6
symbol rs232_rx = portc.7

symbol can_rx = portb.3
symbol can_tx = portb.2

symbol regim_vref = cvrcon'
v_ref_off con %00000000'
regim_vref =v_ref_off' v_ref_test_zero

regim_compar = regim_digital_port_d'
adcon0 = 0'ADC
'adcon1 = %00000110' ADC 4585
adcon1= %00111111' pic18f4580 (portb.4 pin37)
trisa=%00000000'
trisb=0'

input portb.6'
input portb.7

trisc=0


trisd=0
'trise=0

porta=0
portb=0
portc=0

output porte.0'
porte.0=1' pin 25 4585
output porte.1'
porte.1=1' pin 26 4585
output porte.2
porte.2=1

portd=0
portc.2=1'cs_eeprom
input porta.5'lvd_in
porte.2=1'cs_time

input rs232_rx
INPUT rs232_tx'output
rs232_tx=1'off

input can_rx
output can_tx
can_tx=1

output mux_on'mux_on
mux_on=0


regim_taymer_0=vkl_taymer_0
@clrf TMR0L



@ INT_ENABLE TMR0_INT

Main:
PAUSE 1000'`1ms
GOTO Main

sub_sensor_led:
toggle mux_on'test - !!!!!!!!!!!!!!!!!!!!! not working - no signal with T=8,192 ms

@ INT_RETURN;sub_sensor_led

end