Search found 11 matches
- 23 Nov 2010 20:47
- Forum: mikroC PRO for PIC General
- Topic: float number on T6963C GLCD
- Replies: 14
- Views: 7474
Re: float number on T6963C GLCD
I have a similar problem, but it looks much simpler. I'm trying to calibrate a range finder and used the code above to try to troubleshoot my program. I am looking for three digit resolution and am instead getting "x.xe-1" on the LCD screen. I am using the LCD screen that comes on the Easypic 6 deve...
- 10 Sep 2010 23:12
- Forum: mikroC PRO for PIC General
- Topic: Variable Pulse with 50Hz Duty Cycle
- Replies: 0
- Views: 935
Variable Pulse with 50Hz Duty Cycle
I'm trying to get Timer0 set up in order to create a 50Hz duty cycle to control standard hobby servos. The following code has the correct duty cycle and sweeps the pulse width from ~1ms<PW<~2ms. The problem is that PW is low instead of high, and the remainder of the 20ms is high instead of low. I ha...
- 31 Aug 2010 19:26
- Forum: mikroC PRO for PIC General
- Topic: Servo & Timer0
- Replies: 1
- Views: 1333
Servo & Timer0
I pieced together a code that outputs an R/C PWM signal. I had it working correctly until the chip died on the EasyPIC6 board. I replaced it with an identical chip and reprogrammed it. Now, instead of getting a 20ms duty cycle on the oscilloscope, I'm getting a 60us duty cycle. The chip is a 16f876 ...
- 27 Aug 2010 17:47
- Forum: mikroC General
- Topic: PWM with Timer0
- Replies: 4
- Views: 3214
Re: PWM with Timer0
Here's that post I mentioned might come a little later. The program seems to be working to the extent I have it programmed. All that is but the timer interrupt. I've run the debugger to ensure the proper steps are being taken with all of my assigned variables. Apparently the timer does not function ...
- 26 Aug 2010 21:34
- Forum: mikroC General
- Topic: PWM with Timer0
- Replies: 4
- Views: 3214
Re: PWM with Timer0
Thanks for the reply. I know the code looks pretty bad but I compile my code frequently just to keep my errors from compounding. The chip is a 28 pin 16f876. I finally figured out that instead of using the register name in the datasheet (TMR0IF), that I have to use T0IF. I'm used to a different comp...
- 26 Aug 2010 19:16
- Forum: mikroC General
- Topic: PWM with Timer0
- Replies: 4
- Views: 3214
PWM with Timer0
I'm working on a PWM program to run four servos, however when I compile it I get the error, "Operator '.' is not applicable to these operands 'INTCON' ". The error refers to line 9 and 11, and the way I reference TMR0IF. Apparently I can't use INTCON.TMR0IF, or even just TMR0IF without getting an er...
- 24 Aug 2010 23:49
- Forum: mikroC PRO for PIC General
- Topic: Servo & PWM Setup
- Replies: 12
- Views: 6226
Re: Servo & PWM Setup
This is what I have so far. I'm trying to work around the PWMx_Init() limitation. I still have a problem with the program recognizing inputs from PortA in addition to a decreasing and inverting PWM signal. The only thing that halts this is to press the RA4 button. I'm working with the EasyPIC6 board...
- 24 Aug 2010 21:25
- Forum: mikroC PRO for PIC General
- Topic: Servo & PWM Setup
- Replies: 12
- Views: 6226
Re: Servo & PWM Setup
Thank you. Half of the problem is finding where in the datasheet to look.
- 24 Aug 2010 17:59
- Forum: mikroC PRO for PIC General
- Topic: Servo & PWM Setup
- Replies: 12
- Views: 6226
Re: Servo & PWM Setup
The new issue is that while the PWMx_Init(50) was compiling, now it does not. I guess I get to play with timers now.
- 24 Aug 2010 17:29
- Forum: mikroC PRO for PIC General
- Topic: Servo & PWM Setup
- Replies: 12
- Views: 6226
Re: Servo & PWM Setup
I've tried modifying the example a few times. Below is what I'm trying to run. Do you see anything obviously wrong? My only guess is that I misread the ADCON1 register settings. Otherwise, no matter what I do the servos keep maxing out to the left and are always unresponsive to inputs from PortA. Th...
- 24 Aug 2010 04:04
- Forum: mikroC PRO for PIC General
- Topic: Servo & PWM Setup
- Replies: 12
- Views: 6226
Servo & PWM Setup
I've recently switched from the CCS compiler to the MikroC compiler. My background is in the design and manufacture of unmanned systems, but not the programming behind them. Historically, I have been able to get things working using the old compiler but after switching, there are enough differences ...