Search found 18 matches

by Nethacks
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:

Code: Select all

const TempSensor1Port as byte = PortA
by Nethacks
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?

:?:
by Nethacks
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.
by Nethacks
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...
by Nethacks
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
by Nethacks
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...
by Nethacks
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...
by Nethacks
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.
by Nethacks
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 ...
by Nethacks
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:

Code: Select all

 do                                 'Wait till ADC conversion is done
       delay_ms(1)
 loop until ADCON0.1 = 1
Somebody knows a solution for this?
by Nethacks
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...

Go to advanced search