Gast
#2302248
Hallo Leute,
Will bei einem PIc18F14k50 den USB Interruptbetrieb und den Sleep mode
gmeinsam nutzen.
Leider funktioniert das nicht so richtig. Hier mein Quellcode:
sub procedure Interrupt()
USB_Interrupt_Proc()
if (HID_Read() > 0) then
Led = 1
if CheckSystemCommand = 0 then
Read_Sht
Convert_Data_to_text
end if
while(HID_Write(@USB_writebuf,42) = 0)
NOP
wend
Led = 0
end if
end sub
main:
InitConfig 'Set input,Outputs,...
ReadEEpromDatas 'Offsets,serial,...
HID_Enable(@USB_readbuf,@USB_writebuf)
delay_ms(1500)
Led = 0
while TRUE
sleep
nop 'Some Operations to starting up the OSC
nop
nop
nop
nop
nop
nop
nop
nop
wend
Weis jemand, wie ich das Problem umgehen kann?