Search found 18 matches
- 23 Apr 2018 13:05
- Forum: mikroBasic PRO for PIC General
- Topic: Assign a Port to a variable for 1wire library use
- Replies: 3
- Views: 1531
Re: Assign a Port to a variable for 1wire library use
I will try it. Thank you
- 19 Apr 2018 14:15
- Forum: mikroBasic PRO for PIC General
- Topic: Assign a Port to a variable for 1wire library use
- Replies: 3
- Views: 1531
Assign a Port to a variable for 1wire library use
Dear friends,
I want to read several DS18B20 and want to use the 1wire library.
I want to be flexible in the code and want to run the 1wire library more times.
So i need to declare a Port AND a Pin.
But how todo this?
This doesn't work:
I want to read several DS18B20 and want to use the 1wire library.
I want to be flexible in the code and want to run the 1wire library more times.
So i need to declare a Port AND a Pin.
But how todo this?
This doesn't work:
Code: Select all
const TempSensor1Port as byte = PortA
- 19 Apr 2018 14:14
- Forum: mikroBasic PRO for PIC General
- Topic: How long takes the 1 wire commands?
- Replies: 2
- Views: 1268
Re: How long takes the 1 wire commands?
Thank you
- 11 Apr 2018 11:38
- Forum: mikroBasic PRO for PIC General
- Topic: How long takes the 1 wire commands?
- Replies: 2
- Views: 1268
How long takes the 1 wire commands?
Hello,
For an application, i must know, how long take a 1 wire command,like:
Ow_Reset()
Ow_Write()
Ow_Read()
Also i must know, how fast ist the datarate. 16 kbit/s ?
Someone know this?
For an application, i must know, how long take a 1 wire command,like:
Ow_Reset()
Ow_Write()
Ow_Read()
Also i must know, how fast ist the datarate. 16 kbit/s ?
Someone know this?
- 22 Feb 2018 19:43
- Forum: mikroC PRO for PIC General
- Topic: DS18B20 at PIC12F1572 always return 255,255
- Replies: 1
- Views: 1029
Re: DS18B20 at PIC12F1572 always return 255,255
Found it myself:
OSC must be more then 500khz.
Set it to 16 Mhz and it work fine.
OSC must be more then 500khz.
Set it to 16 Mhz and it work fine.
- 22 Feb 2018 15:48
- Forum: mikroC PRO for PIC General
- Topic: DS18B20 at PIC12F1572 always return 255,255
- Replies: 1
- Views: 1029
DS18B20 at PIC12F1572 always return 255,255
Hey guys (and girls), I have following problem: I want to read out the temperature of a DS18B20 But the DS18B20m always return "255". What I have tried: Another DS18B20 DS18B20 at the ext. Sensor clamps Pull up value changed. (1k,1k2,1k8,2k2,3k3,4k7) Another PIC12F1572 What is running: 5V on DS18B20...
- 20 Sep 2017 11:34
- Forum: mikroBasic PRO for PIC General
- Topic: Pic Programmieren in Wien gesucht ....
- Replies: 3
- Views: 2417
Re: Pic Programmieren in Wien gesucht ....
Könnte dir da meine Hilfe anbieten.
Einfach auf meiner Seite melden : www.hydrothyr.at
Allerdings in Salzburg
Einfach auf meiner Seite melden : www.hydrothyr.at
Allerdings in Salzburg
- 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: 4990
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
Now all is working thank you
- 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: 4990
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 the PWM start/Init,.. to the hardware init procedure...
- 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: 4990
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 WDT time. Would this the bet...
- 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: 4990
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.
- 30 Aug 2017 08:30
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4990
Re: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase
Some more pics:
- 30 Aug 2017 08:29
- Forum: mikroBasic PRO for PIC General
- Topic: PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
- Replies: 9
- Views: 4990
PIC12F1572: Problem with PWM and sleep/wdt: PWM increase ran
Hello Guys, I have a program with have following sequences: After startup: Analyse 30 sec. Sleep 96 sec. Analyse 30 sec. Sleep 96 sec. ... ... Now i have following problem: If the sleep command is executed, the PWM output increase/decrease randomly. (See attached files) Every time the sleep loop is ...
- 24 Aug 2017 20:40
- Forum: mikroBasic PRO for PIC General
- Topic: Measure own VDD Voltage
- Replies: 1
- Views: 1520
Re: Measure own VDD Voltage
OK. It doesn't work
It hangs here:
Somebody knows a solution for this?
It hangs here:
Code: Select all
do 'Wait till ADC conversion is done
delay_ms(1)
loop until ADCON0.1 = 1
- 24 Aug 2017 09:55
- Forum: mikroBasic PRO for PIC General
- Topic: Measure own VDD Voltage
- Replies: 1
- Views: 1520
Measure own VDD Voltage
Hello other users, I want to measurement the VDD voltage of a PIC12F1572 and send it via uart to the pc. I am not sure, if this code is working. I never have programmes PIC µC before. Can somebody take a look on it? 'Used Processor: PIC12F1572 'Internal oscillator with 500khz 'Measure VDD and send i...