Search found more than 2220 matches

Return

by Benj
Fri Aug 13, 2010 2:23 pm
Jump to forum
Jump to topic

Programming a 12F675 with internal MCLR and internal clock

When programming a 12F675 device which has been configured with an internal clock and an internal MCLR the default PPP settings will not work to correctly program the device. To get around this problem go into PPP and click options. From Flowcode --- Chip -> Configure -> Options From PPP itself --- ...
by Benj
Thu Jul 08, 2010 3:17 pm
Jump to forum
Jump to topic

Re: ADC Inputs

Hi Medelec, Ah I wonder how those pins got missed. Ok I will sort for the next revision, thanks for the spot. I have now updated the FCD files for the following devices, 18F2221, 18F2321, 18F2423, 18F2523. Would you mind having a quick check to ensure that the problems have been fixed, I could not s...
by Sean
Wed Mar 31, 2010 2:51 pm
Jump to forum
Jump to topic

Re: 10 Bit Resolution

I have posted a reply to a similar question in a adjacent topic. http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=28&t=7256&p=18122#p18122 The resolution of the MIAC ADCs should not be affected by the input circuitry, but the accuracy of the applied voltage will be limited by the 1% ...
by Benj
Wed Apr 28, 2010 9:16 am
Jump to forum
Jump to topic

Re: Integrating C with Flowcode

Hello Medelec, Using the C code icon you can declare the variable like this. char FCV_CCPRL; or if you dont want to use the Flowcode formatting on the variable. char ccprl; YOu can either use in the supplementary code window to make the variable global or you can define it inside a function to make ...
by Steve
Tue Sep 07, 2010 5:53 am
Jump to forum
Jump to topic

Re: MY PROGRAM WILL NOT COMPILE TO ASM OR THE CHIP

My post simply refers to variables that are declared as Flowcode variables rather than variables declared within the C code itself. Declaring the variable in the C code using "char error;" means the variable is only "visible" in the C code and cannot be used within any other Flow...
by Steve
Fri Feb 27, 2009 3:20 pm
Jump to forum
Jump to topic

Re: Closed Loop Motor Control.

There's an article about lookup tables in our "Articles" section of the forum - this may help. But also, be aware that the "voltage" reading will probably be a byte value (0-255) representing the ADC value. Also, the RPM value you use may not necessarily be the actual RPM value, ...
by Sean
Fri May 01, 2009 11:51 am
Jump to forum
Jump to topic

MX008 - Introduction to interrupts

Article: http://www.matrixmultimedia.com/article.php?a=55

If you have any questions for the author or comments on the article, please post them below.
by ncc1502
Tue Mar 30, 2010 8:02 am
Jump to forum
Jump to topic

Re: Is your Project Not working? Help and General Advice

It might be an open door, but........ My experience is that when you simulate a program, almost all variables have (automaticly) 0 as a value at the start of the program. When running this program on a microcontroller, this is for sure not the case and unprodicted things (or nothing) will happen. Th...
by Benj
Tue Mar 30, 2010 9:29 am
Jump to forum
Jump to topic

Re: Is your Project Not working? Help and General Advice

Rule of thumb to follow when working with variables on micros is:

Do I read the variable before I write to the variable?

If you do then you must initialise the variable.
by Steve
Wed Nov 17, 2010 8:10 am
Jump to forum
Jump to topic

Re: Two pwm outputs with only one CCP

Hi Martin,

Ben's currently on holiday, which is why you've not had a reply to your other question. He's due back tomorrow (or perhaps even today), so you should get a reply soon. The same goes for this question too.
by Dan81
Thu Sep 23, 2010 2:37 pm
Jump to forum
Jump to topic

Re: Mathimatical question

Hello John

If I understand your question :

D=B when C=255 and D=A when C=0.

D = (((B-A)*C)/255) + A ; D must be an integer.
Be careful with the brakets or accuracy will be lost

If it is not the right answer : sorry ,i will remove it .


Daniel
by Benj
Thu Nov 18, 2010 2:54 pm
Jump to forum
Jump to topic

Re: Two pwm outputs with only one CCP

Hi Medelec, Sorry for the delay. You can do this using a custom interrupt. Enable code - Note that the x's should be replaced with values for the registers. ccpr1h = x; //Set capture compare setpoint ccpr1l = x; t1con = x; //Setup timer and start running ccp1con = x; //Configure CCP1 settings st_bit...
by Steve
Mon Dec 06, 2010 11:51 am
Jump to forum
Jump to topic

Re: Two pwm outputs with only one CCP

I'm by no means an expert, but here are my thoughts... P1A and P1B are not independent, so this in not an option. Looking at the datasheet, I think you have 2 choices - use the "compare" mode of that chip to generate a software interrupt at certain times, or just bitbang both PWM channels....
by Mikat
Mon Dec 13, 2010 10:30 am
Jump to forum
Jump to topic

Re: Two pwm outputs with only one CCP

That 38Hz could mean that the int freq is original 3800Hz...
I notice the c code tmr0 += 254; should set the tmr0 value at 254, but i think it should be tmr0 = 254;?
by Jan Lichtenbelt
Fri Dec 24, 2010 9:02 am
Jump to forum
Jump to topic

Christmas Sudoku

Hello All, Just for Christmas a Sudoku in Flowcode. It is not an easy one. So if your are lonely, take your time to solve it. If you have friends and family at home, take care of them. Mery Christmas Jan Lichtenbelt Remarks: 1) Only Flowcode simulation has been tested 2) Suggestion to solve can be f...
by zen
Mon Jan 03, 2011 2:43 pm
Jump to forum
Jump to topic

Bit Bang PWM for RGB common cathode LED using ADC

I thought I would post this FCV4 program up for anybody needing a program to control a RGB LED's color using bit banged pwm outputs that are controlled using ADC inputs from two potentiometers. I looked for a while trying to find an example of a program like this and I had no luck. This program shou...
by Sean
Wed Jan 05, 2011 1:39 pm
Jump to forum
Jump to topic

Re: Programmable RC-5 Remote Control

Compilation succeeds if intedg0 is changed to INTEDG0. I am not able to do any hardware testing at the moment. If it's any help, the original MIAC RC5 article program contains the same basic receiver program (written in Flowcode) and compiled for the 18F4455. Timing and timer configuration details m...
by Steve
Fri Feb 19, 2010 10:16 am
Jump to forum
Jump to topic

Re: Auto clear watchdog problem

Or just use the following, which should be compiler-independent:

Code: Select all

MX_CLEAR_WATCHDOG;
by Steve
Fri Jan 07, 2011 7:58 am
Jump to forum
Jump to topic

Re: Programmable RC-5 Remote Control

The code for the "defines" section of the keypad component has been customized to include a load of definitions for the RC5, which might be causing some problems.
by JohnCrow
Sun Dec 05, 2010 3:29 pm
Jump to forum
Jump to topic

Custom E-Blocks

I have just recently completed building a couple of custom E-Blocks. They have both been built on the EB017 Patch Board 4 x 20 LCD Display LCD-Display - Web.jpg This uses a standard 4x20 LCD display from Rapid. The connections run on the back of the board to the 10 pin SIL header. Connections are ba...
by Dan81
Tue Jan 18, 2011 11:01 am
Jump to forum
Jump to topic

Re: How to receive/send RS232 Byte not Char

Hello Niro If you want to read 0xFF, in the properties of the RS232 component, you must choose int in the "char receive type". If there is no reception the return value will be 512. All is explained in the help file. rs_prop2.jpg Your variable must be an integer. I use Flowcode4 for Pic. D...
by nmindana
Wed Jan 19, 2011 10:44 am
Jump to forum
Jump to topic

Re: V4 compiling error

Dear All, Thank you for all your help. Flowcode is a brilliant piece of software. I have sorted out my problem, problem with maths, just realised 0/0 is undefined value, which the PIC reads as 255. Special thanks to medelec35 who ans every question posted, which is very helpful for novices like me. ...
by Steve
Mon Oct 18, 2010 7:58 am
Jump to forum
Jump to topic

Re: Is your Project Not working? Help and General Advice

To check for errors: If you download Notepad++ or notepad2 (or any other notepad replacement that shows line numbering). Then in 'Chip, 'Compiler Options' Where is says file viewer, just browse to the new notepad replacement. You only need to do this once. You can even use Notepad itself to do this...
by Spanish_dude
Mon Jan 17, 2011 10:53 pm
Jump to forum
Jump to topic

Re: Bubble Sort?

You should try the binary sort algorithm. Bubble sort works great, but it needs to check the whole array again and again. I know that for something like this there's no need for improvement, but, it could be interesting to take a look at. Anyways, If you start a sort algorithm It will change the pla...
by Spanish_dude
Fri Dec 31, 2010 9:27 am
Jump to forum
Jump to topic

PC to PIC communication: Part 1

Hi everyone, This is the first part of the article : PC to PIC communication In this article I'll talk about: - Setting up VBA in Excel - Adding the COM port icon to VBA - Basic VBA program using the COM port Requires: - COM port or USB to Serial - RS232 to TTL converter (I use a MAX232) Setting up ...