Search found 12 matches
- 13 Jul 2017 17:58
- Forum: mikroBasic PRO for PIC General
- Topic: 18F47K40 PWM problems
- Replies: 1
- Views: 1598
18F47K40 PWM problems
I have been having trouble getting the PWM modules on my 18F47K40 MCU to function. I've examined every inch of the 18F47K40's data sheet, but I'm not sure where I'm going wrong. In the included code, the MCU samples an analog signal on RB4, converts it to a PWM value (0 to 255) then sends it to the ...
- 13 Jul 2017 17:29
- Forum: mikroBasic PRO for PIC Wish List
- Topic: Multiple timer control for PWM in the 18F27/47K40
- Replies: 1
- Views: 2010
Multiple timer control for PWM in the 18F27/47K40
The PWM module in the 18F27/47K40 (and in other MCU's I imagine) can use timers other than TIMER2. Will this functionality be implemented in future mikroBasic Pro upgrades?
Dave H
Dave H
- 10 May 2013 20:05
- Forum: mikroBasic PRO for PIC General
- Topic: 18F26K22/18F46K22 PWM2 Configuration Fuse not switching
- Replies: 2
- Views: 2924
Re: 18F26K22/18F46K22 PWM2 Configuration Fuse not switching
Thanks for the response Marina. In the time it took for you to respond, I managed to figure it out. I had a command in the timer_setup sub procedure that was not only not necessary, but was the cause of the problem: T1CON.T1OSCEN = 1 ' bit 3 Timer1 Oscillator Enable Control bit: 1 = enable ' This tu...
- 06 May 2013 23:07
- Forum: mikroBasic PRO for PIC General
- Topic: 18F26K22/18F46K22 PWM2 Configuration Fuse not switching
- Replies: 2
- Views: 2924
18F26K22/18F46K22 PWM2 Configuration Fuse not switching
I have been setting up the 3 PWM outputs on these two MCU's for use in two of my projects. One uses an 18F26k22 and the other an 18F46K22 (Both from the same family) so with a few exceptions the programs are nearly identical. The problem occurs when switching the configuration fuse in the edit proje...
- 09 Aug 2012 23:43
- Forum: mikroBasic PRO for PIC General
- Topic: Chip seems to freeze up randomly - Take Two
- Replies: 0
- Views: 1189
Chip seems to freeze up randomly - Take Two
This is basically some good advice to all programmers: In my post of June 12, 2012, I was having difficulties with the ADC module in my 16F1938. After a certain period of time the chip would freeze up and the LCD display would stop updating. After much trial and tribulation (Kudos to BarryP for your...
- 12 Jun 2012 16:01
- Forum: mikroBasic PRO for PIC General
- Topic: Chip seems to freeze up randomly
- Replies: 4
- Views: 2498
Re: Chip seems to freeze up randomly
Hi, Have you considered tracking down where it is locking up by setting a port value for each location in the code. while TRUE 'Read Data from AN13 on pin 26 portb = 0 Analog_In_1 = ADC_Read(13) portb = 1 'Value Conversions Dig_Value = Analog_In_1 If Dig_Value < 1 then Dig_Value = 0 'Make sure valu...
- 11 Jun 2012 22:04
- Forum: mikroBasic PRO for PIC General
- Topic: Chip seems to freeze up randomly
- Replies: 4
- Views: 2498
Re: Chip seems to freeze up randomly
It doesn't seem to be a software problem. Your code doesn't have any apparent mistakes and the main loop runs correctly many times before anything happens. I'd look into the hardware - ground/supply connections, decoupling capacitors, free-floating inputs, and the like. All of the parts and connect...
- 11 Jun 2012 21:21
- Forum: mikroBasic PRO for PIC General
- Topic: 'main function is not defined'
- Replies: 9
- Views: 2700
Re: 'main function is not defined'
OK, I got the source file problem solved, but when I build the project, close it down, then re-open it, the source mbas file is once again missing and I have to re-load it. I've tried it several times and the same thing happens every time. Have you added the file to the sources section in 'Project ...
- 05 Jun 2012 15:30
- Forum: mikroBasic PRO for PIC General
- Topic: 'main function is not defined'
- Replies: 9
- Views: 2700
Re: 'main function is not defined'
OK, I got the source file problem solved, but when I build the project, close it down, then re-open it, the source mbas file is once again missing and I have to re-load it. I've tried it several times and the same thing happens every time.
- 05 Jun 2012 15:16
- Forum: mikroBasic PRO for PIC General
- Topic: 'main function is not defined'
- Replies: 9
- Views: 2700
Re: 'main function is not defined'
OK guys, so how do you do that?
- 04 Jun 2012 19:22
- Forum: mikroBasic PRO for PIC General
- Topic: 'main function is not defined'
- Replies: 9
- Views: 2700
'main function is not defined'
Now I've got another problem. The code I posted below compiled fine when I posted it on Friday (Subject: Chip seems to freeze up randomly), now when I try to compile it I get a 'main function is not defined' error. WTH???????? I can't seem to find any errors anywhere. Have I missed something? progra...
- 01 Jun 2012 20:14
- Forum: mikroBasic PRO for PIC General
- Topic: Chip seems to freeze up randomly
- Replies: 4
- Views: 2498
Chip seems to freeze up randomly
I have an interesting problem. I have a basic circuit involving a 16F1938 and an LCD display. The value of a potentiometer is read from port RB5 (AN13) and displayed on the LCD display along with a calculated voltage value. This is on a custom made board. The code is as follows: program PWM_Control_...