Search found 239 matches

by womai
31 Jul 2012 16:09
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Serious bug in Delay_ms, PWM_init and maybe other functions
Replies: 3
Views: 1780

Re: Serious bug in Delay_ms, PWM_init and maybe other functi

Thanks for the detailed answer. One interesting detail is that the old MikroC for dsPIC (V4.0) definitely needs to be set to 128 MHz to produce correct results in my case; after careful study of the clocking scheme ìn the device data sheet I concur that 64 MHz is the correct value so it means V4.0 i...
by womai
31 Jul 2012 06:41
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Serious bug in Delay_ms, PWM_init and maybe other functions
Replies: 3
Views: 1780

Serious bug in Delay_ms, PWM_init and maybe other functions

I already re-submitted this as a ticket but no answer from ME in a week (is anybody still reading the submitted tickets? At least a short acknowledgement would be nice). So I'm trying my luck here on the forum, maybe others have seen similar behavior: PWM, Delay_ms and potentially many more function...
by womai
06 Jul 2012 20:11
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

No need for Delay_5ms after ADCON0.GO indicates that the conversion has finished - won't buy you anything. Also, I would pull ADCON1 = 0x00; ADCON2 = 0xAE; out of the sample routine and only do this once, and then remove Delay_10ms(); But in any case, glad you got it working and kudos for not giving...
by womai
06 Jul 2012 20:00
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

So what was the problem then? (it is always helpful for others to see the final, working solution as well!)
by womai
06 Jul 2012 08:09
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

So to run my ADC. I need to use the configuration for the pic18f2550 ?? No, that's not what I meant. I was talking about the USB part and the clock/oscillator configuration. The ADC on the 14K50 has been working fine for me ever since I started with it 2 years ago (the problem was missing library s...
by womai
06 Jul 2012 06:50
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

Well, that's already something! When changing microcontrollers, MikroC loses all project settings (e.g. oscillator configuration), so you need to painstakingly recreate them. What's more, the clock configuration of the 18F2550 is VERY different from the 18F14K50. Among others, the 14K50 needs a 12 M...
by womai
05 Jul 2012 16:54
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

Did you try the example I linked to in an early post on this thread? It has the full PIC code as well as a VB6 program that goes with it. It's proven to work by several people. So if it does not work chances are your wiring is wrong somewhere.
by womai
05 Jul 2012 16:13
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

Oops, missed the interrupt procedure, because I use polling in my program. In tour case make sure the descriptor file is configured correctly for interrupt then.
by womai
05 Jul 2012 15:22
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

I can spot two serious mistakes in your code that can explain your problems: First, you need to continuously poll the USB port. For that, simply insert: USB_Polling_Proc (); in your main loop. Second, you need to do this quite often, about once every msec. So a Delay_1sec is not going to work becaus...
by womai
26 Jun 2012 20:41
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

I believe you can disable the internal 3.3V regulator of the non-LF PIC, and then supply the 3.3V externally. (at VCC=3.3V you HAVE to do this because the regulator's finite dropout voltage would mean it would no longer be able to regulate). Have a read through the PIC datasheet, there is a register...
by womai
26 Jun 2012 19:58
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

I think you are correct but I have to admit I did not check the data sheet recently. My scope is running the PIC at 5V so the issue didn't come up for me.
by womai
22 Jun 2012 18:09
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

Also if you want to use USB then you must run at precisely 48 MHz, i.e. a 12 MHz crystal and 4x PLL enabled. The internal oscillator is not as accurate as a crystal, so it may not work for USB, or only in a certain temperature range, or only for some devices.
by womai
22 Jun 2012 15:52
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

The ADC is working fine - see my latest project at http://www.dpscope.com --> DPScope SE, the whole design is based on the 18F14K50 and uses the ADC. The problem was that MikroC did not have library support for this PIC (but that may have changed over the last year, I never checked again, but you sh...
by womai
22 Jun 2012 14:39
Forum: mikroC PRO for PIC General
Topic: MINI USB embedded system / USB datalogger need some advices
Replies: 58
Views: 16390

Re: MINI USB embedded system / USB datalogger need some advi

This previous thread should get you started: http://www.mikroe.com/forum/viewtopic.php?f=88&t=26891 A few posts into the thread you find a complete sample program that reads and writes data over USB. It uses a PIC18F14K50 which is smaller and cheaper than the 18F2550, should be good for you since yo...
by womai
22 Jun 2012 14:24
Forum: mikroC General
Topic: how to make VU bar graph LCD with pic16f877?
Replies: 2
Views: 2124

Re: how to make VU bar graph LCD with pic16f877?

You hook a display to the PIC, write the code, compile it and load it into the PIC. (That's about all one can say since you do not give ANY details - what kind of display, what have you done so far - code, hardware and so on. Don't expect somebody to just hand you a complete project when you can't b...

Go to advanced search