Search found 47 matches

by Radu86
06 Mar 2011 19:37
Forum: mikroC PRO for PIC General
Topic: Setting bit in pointer address ?
Replies: 9
Views: 2475

Re: Setting bit in pointer address ?

Yes, it says that pointers don't support "." operator. That's why I did the workaround.
http://www.mikroe.com/forum/viewtopic.php?f=88&t=29243 this is where I have asked for something similar.
by Radu86
06 Mar 2011 18:17
Forum: mikroC PRO for PIC General
Topic: Setting bit in pointer address ?
Replies: 9
Views: 2475

Re: Setting bit in pointer address ?

As far as I know you can do this using bitwise operators: -XOR (^) : let's say this is your byte: 0100 1111. You want to change bit 6. you do 0100 1111 ^ 0100 0000. -> 0000 1111. -OR (|): your byte: 0000 1111. you want to set bit 6: 0000 1111 | 0100 0000 -> 0100 1111. -AND (&): your byte 0100 1111. ...
by Radu86
04 Mar 2011 13:12
Forum: mikroC PRO for PIC General
Topic: PWM Problem
Replies: 9
Views: 2354

Re: PWM Problem

@ananth.antony: have you also tried a hardware test? Maybe the virtual sim is working ok but a practical test doesn't. I have tried this example both with easypic6 and ISiS on a 18F452 PIC. Worked ok for me
by Radu86
04 Mar 2011 09:53
Forum: mikroC PRO for PIC General
Topic: PWM Problem
Replies: 9
Views: 2354

Re: PWM Problem

The PWM is a built in feature. So you don't get to choose pe desired pin, you get to use the Microchip has assigned. I believe it's the RC1 and RC2 pins. The PWM1_init() and PWM2_Init() take care of the initialization of the modules.

Are you sure RA0, RA1, RA2, RA3 are pulled down?
by Radu86
01 Mar 2011 14:36
Forum: mikroC General
Topic: sending data from pc to pic 18f452 and display it on lcd
Replies: 2
Views: 2029

Re: sending data from pc to pic 18f452 and display it on lcd

How do you want to send the data? I mean, are you doing to write your code for accessing serial port and sending and receiving data, or do you have some other idea? On the pic part it is easy. You can use mE library for UART communication. The help files will give you everything you need.
by Radu86
24 Feb 2011 23:11
Forum: Website & Forums Wishlist
Topic: PWM program from mikroC PRO for PIC Help
Replies: 23
Views: 30041

Re: PWM program from mikroC PRO for PIC Help

Well, we do not know what's the code in mE's library. I believe it set's the OSC so you don't have to. But I am not sure.
PWM1_init initializez the first module. I don't know how many modules does your pic have. You should check the datasheet for that.
by Radu86
24 Feb 2011 22:46
Forum: Website & Forums Wishlist
Topic: PWM program from mikroC PRO for PIC Help
Replies: 23
Views: 30041

Re: PWM program from mikroC PRO for PIC Help

I have sent you a PM with a link towards the video.
by Radu86
24 Feb 2011 21:33
Forum: Website & Forums Wishlist
Topic: PWM program from mikroC PRO for PIC Help
Replies: 23
Views: 30041

Re: PWM program from mikroC PRO for PIC Help

You have to press repeatedly or keep a button pressed for a little while to notice the change. After I download the hex into the PIC, the RC1 and RC2 leds are lighting very dim. When I press a button it either gets dimmer or stronger. As I said, it is not instant. You have to press repeatedly or kee...
by Radu86
24 Feb 2011 21:00
Forum: Website & Forums Wishlist
Topic: PWM program from mikroC PRO for PIC Help
Replies: 23
Views: 30041

Re: PWM program from mikroC PRO for PIC Help

I really don't know. I have tried this same example and it worked for me. I used PIC18F452 and easyPIC 6. All I have changed was the configuration for PIC's I/O pins.
I have checked it with an oscilloscope to see how the signals change and everything is ok.
by Radu86
24 Feb 2011 20:19
Forum: Website & Forums Wishlist
Topic: PWM program from mikroC PRO for PIC Help
Replies: 23
Views: 30041

Re: PWM program from mikroC PRO for PIC Help

Ra0-Ra3 are used to increase or decrease the length of the pulses. They modify how long does the PIC keep the pin in High state and how long in keeps it in LOW state. It acts like a chopper.
Thanks for the Proteus. :)
by Radu86
24 Feb 2011 19:02
Forum: mikroC PRO for PIC General
Topic: DS1820 ONE WIRE PROBLEM
Replies: 14
Views: 4295

Re: DS1820 ONE WIRE PROBLEM

Maybe. Anyway, is everything ok now? Or there still is weird stuff goin' on?
by Radu86
24 Feb 2011 18:52
Forum: Website & Forums Wishlist
Topic: PWM program from mikroC PRO for PIC Help
Replies: 23
Views: 30041

Re: PWM program from mikroC PRO for PIC Help

if (ra_bit) = If(ra_bit==1)
When you press the button 5V must get to the pin of the PIC.

If I may, what software do you use to draw the schematics like the one you've posted? Thank you.
by Radu86
24 Feb 2011 18:47
Forum: mikroC PRO for PIC General
Topic: DS1820 ONE WIRE PROBLEM
Replies: 14
Views: 4295

Re: DS1820 ONE WIRE PROBLEM

You're welcome. I still don't know why it blinks, but I use only 0 or 1 for the colour setting.
by Radu86
24 Feb 2011 18:10
Forum: mikroC PRO for PIC General
Topic: DS1820 ONE WIRE PROBLEM
Replies: 14
Views: 4295

Re: DS1820 ONE WIRE PROBLEM

I have reviewed your code. I use EasyPIC6 with PIC18F452 at 8MHz. Except the configuration bits for the GLCD and pin configuration for the 18F452 I haven't changed anything and it works ok for me. Oh I have used While (1) {} not the do while(1). I don't know if this make any difference :) And you ha...
by Radu86
24 Feb 2011 17:30
Forum: mikroPascal General
Topic: 16f688 Analog AN0 Probelm, PLEASE HELP!
Replies: 4
Views: 3564

Re: 16f688 Analog AN0 Probelm, PLEASE HELP!

Right. Ok then, if all the other analog inputs work as they should, then there is something wrong with the 2 problematic ones. As far as I have read the code, there is nothing different between reading the inputs so you should turn your attention towards hardware part. Maybe something interferes wit...

Go to advanced search