Search found 14581 matches

by Benj
Wed Mar 26, 2008 11:54 am
Forum: General / Misc
Topic: delay limitations
Replies: 10
Views: 8874

Re: delay limitations

Hello Tim There is a microsecond command but this has not been implemented into Flowcode as of yet as it does not work for all clock speeds. The C code command is delay_us(1); //Delay for 1 microsecond delay_us(50); //Delay for 50 microseconds A more reliable approach is to use delays of 10 microsec...
by Benj
Wed Mar 26, 2008 10:37 am
Forum: Components (Comms)
Topic: RS232 ISSUING WHEN USING MEGA162
Replies: 4
Views: 4644

Re: RS232 ISSUING WHEN USING MEGA162

Hello

We will look into this problem for you.

However a simple temporary fix would be to go into the Edit - Supplementary code window and enter the following line of code into the top window.

Code: Select all

#define UBRRH UBRR0H
Repeat this for all of the registers that are flagged as not defined.
by Benj
Wed Mar 26, 2008 10:35 am
Forum: Flowcode V2 & V3
Topic: Loop 250 Khz
Replies: 5
Views: 3282

Re: Loop 250 Khz

Hello

The configuration screen in Flowcode replaces these line of code.

@CONFIG_REQ
@__CONFIG PWRTE_ON & WDT_ON & HS_OSC & LVP_OFF

So basically you want a HS oscillator mode with the Watchdog on and LVP off. Other settings are up to you.
by Benj
Tue Mar 25, 2008 4:07 pm
Forum: Flowcode V2 & V3
Topic: Quotes in variables
Replies: 5
Views: 3771

Re: Quotes in variables

Hello Ondra No you cannot include the number 34 inside the speechmarks or it will be interpreted as the ascii chars for 3 and 4. You must do the following to assign the value to a string. example_String = " Hello " example_String[0] = 34 example_String[6] = 34 would provide the string "Hello" If you...
by Benj
Tue Mar 25, 2008 4:02 pm
Forum: Components (Comms)
Topic: RS232 Program conflict
Replies: 22
Views: 12458

Re: RS232 Program conflict

Hello Ondra According to the device datasheet (available from Microchip.com) the interrupt enable bit is RCIE and is found in the pie1 register, the interrupt flag bit is RCIF and is available in the pir1 register. You also need to enable Interrupts via settings bits GIE and PIE in the intcon regist...
by Benj
Tue Mar 25, 2008 3:57 pm
Forum: Components (Comms)
Topic: LIN Components Help
Replies: 6
Views: 6236

Re: LIN Components Help

Hello Ondra

Attached are the LIN bus example files to go with the solution notes.
by Benj
Tue Mar 25, 2008 1:56 pm
Forum: Flowcode V2 & V3
Topic: Loop 250 Khz
Replies: 5
Views: 3282

Re: Loop 250 Khz

Hello

You could use a C code block with the following code.

Code: Select all

while(1)
{
bit_set (portb, 7);
bit_clear(portb, 6);
bit_clear(portb, 7);
bit_set (portb, 6);
clear_wdt();
}
by Benj
Tue Mar 25, 2008 10:33 am
Forum: Components (Comms)
Topic: LIN Components Help
Replies: 6
Views: 6236

Re: LIN Components Help

Hello Ondra

The LIN manual is now available online from the following address,

http://www.matrixmultimedia.com/Learnin ... ersion.pdf
by Benj
Tue Mar 25, 2008 10:13 am
Forum: Flowcode V2 & V3
Topic: Quotes in variables
Replies: 5
Views: 3771

Re: Quotes in variables

Hello Ondra

To do this you will have to assign the ascii numeric value for the " character.

MyStringVar[70] = 34
by Benj
Thu Mar 20, 2008 3:55 pm
Forum: C and ASM Programming
Topic: Interrupts
Replies: 3
Views: 5565

Re: Interrupts

Sorry Pete

Think I must have been in Flowcode mode. Glad you've got it all working now. Yes the ARM devices are certainly very flexible and powerful. Were all looking forward to the Flowcode for ARM release here at Matrix.
by Benj
Thu Mar 20, 2008 11:24 am
Forum: Flowcode V2 & V3
Topic: loop efficiency help needed
Replies: 2
Views: 2412

Re: loop efficiency help needed

Hello Your program is running with a lag as each new switch introduces delay icons. I would change the program so that all of the overall control structure runs without delays. Then I would have a number of variables that represent the states of the outputs which get updated by the control structure...
by Benj
Wed Mar 19, 2008 5:00 pm
Forum: Components (Comms)
Topic: RS232 Receive Variable
Replies: 21
Views: 12810

Re: RS232 Receive Variable

Hello Ondra TestString[0] is referencing a byte from the string. TestString is referencing the entire string. You can use the string compare function available in the string manipulation icon. Here is an example where comparison is a byte variable and TestString is a string variable or array. compar...
by Benj
Wed Mar 19, 2008 2:07 pm
Forum: Components (Comms)
Topic: RS232 Receive Variable
Replies: 21
Views: 12810

Re: RS232 Receive Variable

Hello Ondra The String can be assigned by using a string manipulation icon and the following. MyArrayVar = "Hello" Alternatively you can use a calculation icon with the following, MyArrayVar[0] = 'H' MyArrayVar[1] = 'e' MyArrayVar[2] = 'l' MyArrayVar[3] = 'l' MyArrayVar[4] = 'o' MyArrayVar[5] = 0 Th...
by Benj
Wed Mar 19, 2008 10:15 am
Forum: Components (Comms)
Topic: SPI
Replies: 4
Views: 4886

Re: SPI

Hello

If you go into the SPI properties then there is a help button which should take you directly to the SPI help file.

Otherwise the help file can be found in the main Flowcode V3 folder named SPI.hlp.
by Benj
Tue Mar 18, 2008 10:58 am
Forum: Components (Comms)
Topic: I2C Simulation
Replies: 9
Views: 8276

Re: I2C Simulation

Hello Ralph

Thats great news glad its working correctly for you now.

You could simply fit the 16 bit number into a INT variable.

Eg.

High Byte = 64
Low Byte = 119
Result Int = ( High Byte << 8 ) + Low Byte
by Benj
Tue Mar 18, 2008 10:55 am
Forum: Components (Comms)
Topic: RS232 Receive Variable
Replies: 21
Views: 12810

Re: RS232 Receive Variable

Hello Ondra n the suggestion above if I use "while InChar<>13" as my loop control, would the loop process save the ASCII 13 in the variable then stop or would the loop be stopped before the ASCII 13 is written to the variable. Actually neither. The loop process only tests the variable at the start o...
by Benj
Mon Mar 17, 2008 4:42 pm
Forum: Components (Comms)
Topic: RS232 Receive Variable
Replies: 21
Views: 12810

Re: RS232 Receive Variable

Hello Ondra

You can just use decision icons to look for the incoming codes you are going to use. Eg if it is not a valid code then simply skip the result and scan for the next.
Or you can apply an AND or OR mask to the data to reduce the number of possible inputs.
by Benj
Mon Mar 17, 2008 4:18 pm
Forum: Components (Comms)
Topic: I2C Simulation
Replies: 9
Views: 8276

Re: I2C Simulation

Hello Ralph The last byte variable tells the I2C slave device that no more bytes will be read. So you will need to send a 0 for the first byte and a 1 for the second byte. Also have you used pull up resistors on the line. The I2C driver cannot pull up the line to +5V so it requires the two pull up r...
by Benj
Mon Mar 17, 2008 2:01 pm
Forum: Flowcode V2 & V3
Topic: Timer1
Replies: 22
Views: 14503

Re: Timer1

Here are the latest versions of the FCD files with the PortB interrupt moved to PortA.
by Benj
Mon Mar 17, 2008 1:44 pm
Forum: Components (Comms)
Topic: Program bluetooth board
Replies: 5
Views: 5251

Re: Program bluetooth board

Hello Mark

Glad youve managed to revive your module. Thanks for posting your fix. Let us know if you have any further problems.
by Benj
Mon Mar 17, 2008 1:02 pm
Forum: Components (Comms)
Topic: RS232 Program conflict
Replies: 22
Views: 12458

Re: RS232 Program conflict

Hello Ondra I have updated the RS232 interrupt example now as there were a couple of problems with it before mainly due to the fact that I was editing the file with my beta version of Flowcode. The disable icon is only there as an example. It does not actually get called by the example program as it...
by Benj
Mon Mar 17, 2008 11:23 am
Forum: Components (Comms)
Topic: I2C Simulation
Replies: 9
Views: 8276

Re: I2C Simulation

Hello Ralph The I2C is currently only operational in master mode via Flowcode. This means that you cannot currently use it as a bus between two microcontrollers. Maybe the RS232 or SPI bus would be ok for you to use. You can use Flowcode to test your programs by queing up bytes in the component rece...
by Benj
Mon Mar 17, 2008 11:21 am
Forum: Components (Comms)
Topic: Program bluetooth board
Replies: 5
Views: 5251

Re: Program bluetooth board

Hello Mark It should not be possible to delete the factory settings unless you are using a) your own hardware or b) your own programming language eg C. Have you tried removing power from the bluetooth board to allow the module to reset. If you moved the jumper fom 5V to 3.3V when using a 5V system t...
by Benj
Mon Mar 17, 2008 11:15 am
Forum: Components (Comms)
Topic: FLOWCHART / CAN Bus / Help !!
Replies: 1
Views: 3235

Re: FLOWCHART / CAN Bus / Help !!

Hello

Here is a quick example that shows how to receive any message coming in from the CAN bus.

The program collects the ID_LO and the ID_HI bytes if there is a valid message.

You could then check if the ID is acceptable and then do some further processing etc.
by Benj
Mon Mar 17, 2008 11:02 am
Forum: Components (Other)
Topic: pwm
Replies: 10
Views: 9061

Re: pwm

Hello I did test on ccp1 (RC2) and on ccp2 (RC2) no signal with multimeter By this do you mean I did test on ccp1 (RC2) and on ccp2 (RC1) no signal with multimeter If not then hopefully the problem is just the pin you were testing, Remember to check your configuration settings are correct in Flowcod...