Search found 133 matches: sleep
Searched query: +sleep
- 13 Nov 2023 11:30
- Forum: mikroBasic PRO for PIC General
- Topic: calling sub procedures
- Replies: 2
- Views: 174
calling sub procedures
I'm trying to call a sub procedure at the start of a programme as a default condition. Then send the chip to sleep. On an interrupt the same function is called. I have a error message "Reentrancy is not allowed: function 'test1' called from two threads subtest.mbas". I don't ...
- 20 Jun 2021 19:18
- Forum: mikroBasic PRO for PIC General
- Topic: Sleep and UART interrupt problem
- Replies: 1
- Views: 913
Re: Sleep and UART interrupt problem
some characters lost when chip is in sleep mode and sim868 send some data to PIC. I have seen the datasheet and found out that "AUTO-WAKE-UP ON BREAK" but I don't know how to use it properly. Only a idea, if you don't is using the external ...
- 29 May 2021 08:08
- Forum: mikroBasic PRO for PIC General
- Topic: Sound_Play doesn't work with interrupts
- Replies: 2
- Views: 1059
Sound_Play doesn't work with interrupts
... ' Inc(n) INTCON.2=0 ' If n >= T_m_N * NC0 then For m = 1 to 20 LED = 1 Sound_Play(880, 500) LED = 0 Sound_Play(1318, 500) next m DAC1CON0.7 = 0 Sleep ' end if It is attempt to use Sound_Play in main program body: If ADC_res < 750 then ' For n = 1 to 30 ' BATTERY DISCHARGED! LED = 1 Sound_Play(784, ...
- 20 Feb 2021 08:50
- Forum: mikroBasic PRO for PIC General
- Topic: Sleep and UART interrupt problem
- Replies: 1
- Views: 913
Sleep and UART interrupt problem
HI, Project is a SIM868 and PIC16F1829. PIC chip doesn't work properly with UART interrupt. some characters lost when chip is in sleep mode and sim868 send some data to PIC. I have seen the datasheet and found out that "AUTO-WAKE-UP ON BREAK" but I don't know how to use it properly. Also ...
- 01 Dec 2020 10:33
- Forum: mikroBasic PRO for PIC General
- Topic: Startup problems in windows 10
- Replies: 7
- Views: 1784
Startup problems in windows 10
... with windows XP or 7 Under Win 10 I get a UAC request for an admin password every start up of MB7. As it is a work machine the system goes to sleep after an interval of no activity and always asks for an admin password (not user) to start again. It is fine running under admin but that creates ...
- 06 Sep 2019 06:33
- Forum: mikroBasic PRO for PIC General
- Topic: Mikrobasic 7.5 and USART terminal no display
- Replies: 8
- Views: 1743
Re: Mikrobasic 7.5 and USART terminal no display
... Attached is the program. RDM6300 you can buy it on Aliexpress , Amazon and other places. Price is from 1.25USD and up. Thank you for help. Go to sleep now as it 1:30 in Toronto. I am happy
- 01 Jun 2019 02:32
- Forum: mikroBasic PRO for PIC General
- Topic: PWM bursts not continous
- Replies: 8
- Views: 2347
Re: PWM bursts not continous
... If CMOUT.0 = 1 then ' Battery check For i=1 to 10 Sound_Play(900, 500) ' Play sound of 1 KHz in duration of 500 ms LED=1 Delay_ms(50) LED=0 next i SLEEP end if Delay_mS(1000) SIN_PWM() end.
- 28 Jun 2018 20:39
- Forum: mikroBasic PRO for PIC General
- Topic: Serial (RS232) 4x16 servial display
- Replies: 6
- Views: 2350
Re: Serial (RS232) 4x16 servial display
... the ADC register to a binary string (I don't see why), as an experienced programmer you should be able to create a routine for that in your sleep, assuming you know how to test a bit and what ascii values '0' and '1' are.
- 04 Sep 2017 21:25
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
Now all is working thank you
- 31 Aug 2017 12:43
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
Glad to hear it works :) . I use similar processor and it's enough to switch these two bits 'before sleep PWM1OE_bit:=1; // disable output PWM1EN_bit:=1; // disable PWM 'wake-up PWM1EN_bit:=1; // enable PWM PWM1OE_bit:=1; // enable output The PWM pin is defined as low level ...
- 31 Aug 2017 06:55
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
A little feedback: I tried following code, before sleep: PWM2CON.6 = 0 'Disable PWM output PWM2CON.7 = 0 'Disable PWM module TRISA.0 = 1 'Select RA.0 as input ANSELA.0 = 1 'Select RA.0 as analogue input (save energy) But it was not working. I move ...
- 30 Aug 2017 15:02
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
... can externally ensure valid logical state of such inputs. Floating inputs can lead to a significant current flow through the input stage. After sleep loop, i will reinitialize the whole hardware. There's no need to. It's enough to manipulate two bits to stop PWM and disconnect it from output ...
- 30 Aug 2017 14:30
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
Ok. I understand. I will try to set the Tris Bits all to input, to save more power. After sleep loop, i will reinitialize the whole hardware. I run the sleep loop 6 times with WDT time from 16 seconds, because i will need ~96seconds. I could also do it with 3 X 32seconds ...
- 30 Aug 2017 14:05
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
Sorry, it wasn't clear what you intended. If you want the output low you have to ensure it before going to sleep. Otherwise the state of PWM pin is indeed unpredictable. Best disable the PWM output pin (PWM2CON.OE=0) - having TRISA and LATA appropriately set at initialization ...
- 30 Aug 2017 12:51
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4936
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
I don't need the PWM at sleep.
So thought, if i set the PWM clock to Fosc.
When it goes in sleep mode, PWM stop.
But you see it on the oscilloscope, that the PWM starts with highest duty cycle
This is the problem.
In sleep mode, the PWM should be low.
So thought, if i set the PWM clock to Fosc.
When it goes in sleep mode, PWM stop.
But you see it on the oscilloscope, that the PWM starts with highest duty cycle
This is the problem.
In sleep mode, the PWM should be low.