Search found 14581 matches

by Benj
Wed Jul 04, 2007 3:01 pm
Forum: Flowcode V2 & V3
Topic: Runtime error in simulation
Replies: 5
Views: 4436

Hello

I think it is meant to say 0xXX where XX is 00 to FF.
by Benj
Wed Jul 04, 2007 9:17 am
Forum: Flowcode V2 & V3
Topic: ADC from a PIC 16f877a
Replies: 15
Views: 13875

Hello

All three of your sample functions contain exactly the same code.

You need to assign a different adcon1 value for the VRef+ and VRef-.

Code: Select all

//VREF+
char ta, te, cnt;
adcon1 = 0x01;
ta = trisa; 
...........

Code: Select all

//VREF-
char ta, te, cnt;
adcon1 = 0x08;
ta = trisa; 
...........
by Benj
Tue Jul 03, 2007 3:04 pm
Forum: Flowcode V2 & V3
Topic: timer1: counter and lcd
Replies: 8
Views: 6428

Hello

You can also use long as a 32 bit data type. Unfortunatly this still generates a negative number with the print number funtion of the LCD. We will add this problem to the list of things to do.
by Benj
Tue Jul 03, 2007 1:00 pm
Forum: Flowcode V2 & V3
Topic: timer1: counter and lcd
Replies: 8
Views: 6428

Hello If you are using C icons then you should be able to create an unsigned integer variable by using. unsigned int count = 0xffff; This can then be used as a full 16 bit number. However if you are going to use the LCD say to print out the number FCD_LCDDisplay0_PrintNumber(count); Then you will st...
by Benj
Mon Jul 02, 2007 11:14 am
Forum: Flowcode V2 & V3
Topic: PIC12F629 configuration/program memory failed; PIC16F648A ok
Replies: 28
Views: 22317

Hello I have had a good play around with the 12F629 here using the Matrix hardware, PPP 3.9 and Flowcode V3.2. I was unable to program the PICmicro until I changed the retain OSCCAL option to unticked. To do this I opened Flowcode and clicked Chip -> Configure -> Options and unticked retain OSCCAL v...
by Benj
Mon Jul 02, 2007 11:00 am
Forum: E-blocks
Topic: Non volitile storage
Replies: 10
Views: 9591

If you need a constant value then you can just assign a variable with a value at the start of your program.

EG VAR1 = 23

You will need to make sure that you do not change the value of the variable.
by Benj
Mon Jul 02, 2007 10:43 am
Forum: Flowcode V2 & V3
Topic: Adding 18F2553 to Flowcode
Replies: 2
Views: 2972

Hello

The walkthrough document is now available from

http://www.matrixmultimedia.com/article ... e%20V3.pdf

Let us know how you get on.
by Benj
Mon Jul 02, 2007 10:29 am
Forum: Flowcode V2 & V3
Topic: C code/asm
Replies: 10
Views: 14026

Hello Here is your code. I have reorganised it a little but i think the main problem was this line. decfsz _FCV_VAR1 which needed to be changed to decfsz _FCV_VAR1, F Here is a complete listing of your code which should compile without any errors. asm{ label1: btfsc _portb,7 goto label1 mac1: nop de...
by Benj
Mon Jul 02, 2007 9:44 am
Forum: E-blocks
Topic: Variable name size
Replies: 1
Views: 3342

Hello

The variable name will be replaced with an address in memory so dont worry about creating long variable names as they will not take up any more of the program space.
by Benj
Mon Jul 02, 2007 9:26 am
Forum: Flowcode V2 & V3
Topic: Clock speed
Replies: 4
Views: 5185

Hello

If you use the Chip menu and assign XT mode and also set the clock speed to 32000 then this should all compile and run ok.
by Benj
Mon Jul 02, 2007 9:23 am
Forum: Flowcode V2 & V3
Topic: PIC18F2523 12 bit adc
Replies: 5
Views: 4874

Hello

Thanks for that. Is it running with the proper 12 bit accuracy now.
by Benj
Fri Jun 29, 2007 5:29 pm
Forum: Flowcode V2 & V3
Topic: PIC18F2523 12 bit adc
Replies: 5
Views: 4874

Ok I think I have fixed the problem now Open the FCD file for the 18F2523. and edit the following line. ADCFull="short iRetVal;\niRetVal = (adresh << 2);\niRetVal += (adresl >> 6);\nreturn (iRetVal);\n" Change it to the following ADCFull="short iRetVal;\niRetVal = (adresh << 4);\niRetVal += (adresl ...
by Benj
Fri Jun 29, 2007 5:14 pm
Forum: Flowcode V2 & V3
Topic: PIC18F2523 12 bit adc
Replies: 5
Views: 4874

Hello

I will look into this for you.
by Benj
Fri Jun 29, 2007 5:05 pm
Forum: Flowcode V2 & V3
Topic: Reference voltage for A/D inputs
Replies: 50
Views: 50051

Hello

Yes if you read the signal back as an INT then halving the range of the ADC would give a 9 Bit reading.
by Benj
Fri Jun 29, 2007 9:08 am
Forum: Flowcode V2 & V3
Topic: Reference voltage for A/D inputs
Replies: 50
Views: 50051

Hello Yes you are correct in assuming that the reference voltage will be the same as the supply rail VDD. If you do not have a spare reference pin then im afraid you will have to leave the reference voltage as it is. However using 10 bits of accuracy means that you will still get a range of more the...
by Benj
Thu Jun 28, 2007 1:18 pm
Forum: Flowcode V2 & V3
Topic: Flowcode RS232
Replies: 3
Views: 4349

LOL dont worry its the simple problems that cause the most grief.
by Benj
Thu Jun 28, 2007 12:20 pm
Forum: Flowcode V2 & V3
Topic: Flowcode RS232
Replies: 3
Views: 4349

Hello

There are a few RS232 examples on the Forum.

What are you trying to do with your program. Eg are you just sending out characters or do they mean or trigger something.
by Benj
Tue Jun 26, 2007 4:01 pm
Forum: Flowcode V2 & V3
Topic: I2C + SPI + UART
Replies: 4
Views: 4678

Hello Yes you are right there is a pin confict on the F88. However if you make sure that you are only using one of the hardware components at a time then there shouldn't be a problem. The only time there may be a problem is if there is an external SPI that is transmitting when you are expecting RS23...
by Benj
Tue Jun 26, 2007 3:53 pm
Forum: Formula Flowcode
Topic: Formula Flowcode Micromouse Information and USB Drivers
Replies: 0
Views: 4431

Formula Flowcode Micromouse Information and USB Drivers

Information regarding the Formula Flowcode Micromouse is available from the following location. http://www.matrixmultimedia.com/Formflow.php The Formula Flowcode Micromouse USB drivers are available from the following location. http://www.matrixmultimedia.com/software/HP-629_Drivers.zip The Formula ...
by Benj
Tue Jun 26, 2007 9:17 am
Forum: Flowcode V2 & V3
Topic: Flow code
Replies: 8
Views: 7410

Hello 50MHz is a little high for a frequency counter with a PICmicro. The fastest PICmicro devices are the 18F and they only run with a program speed of 48MHz at their absolute max speeds. For the frequencies you mentioned you will probably need something along the lines of a DSPIC or a 32 bit ARM m...
by Benj
Tue Jun 26, 2007 9:14 am
Forum: Flowcode V2 & V3
Topic: I2C + SPI + UART
Replies: 4
Views: 4678

Hello

the 16F88 is an 18pin device which has a SPI bus as well as a UART. The I2C is not a master I2C so you will probably need to use the software bit banged method.
by Benj
Tue Jun 26, 2007 9:09 am
Forum: Flowcode V2 & V3
Topic: Counting micro-seconds, timer(0) INT & Controlling Servo
Replies: 5
Views: 4797

Hello To configure the Timer Interrupt simply use a TMR0 Interrupt enable. You can set up the frequency in the timer interrupt properties. Remember that the interrupt time is = (1 / Int Frequency). To delay in microseconds you can use one of these C code statements. Remember that delays and interrup...
by Benj
Mon Jun 25, 2007 9:56 am
Forum: Flowcode V2 & V3
Topic: PWM from PIC18F442
Replies: 1
Views: 2453

Hello You can lower the speed of the PWM by lowering the crystal clock frequency. However if you want a really low frequency eg less then 1 hz then it is probably easier to use the output bit flowchart icon. This can be used in a loop as follows. loop { output 0 to bit delay (length) output 1 to bit...
by Benj
Mon Jun 25, 2007 9:50 am
Forum: Flowcode V2 & V3
Topic: RS232 and values of 255
Replies: 2
Views: 2951

Hello An integer variable is essentially a 16bit variable. Eg 2 bytes. To send a value like 1900 then you can do the following. Create a INT variable and assign a value to it. create to byte variables. byte1 = int & 0xFF byte2 = ( int >> 8 ) & 0xFF then you can transmit the byte1 and byte2. Remember...
by Benj
Mon Jun 25, 2007 9:46 am
Forum: Flowcode V2 & V3
Topic: ADC component macro Questions
Replies: 2
Views: 2842

Hello

You must always do a sample ADC before you perform a read. The sample ADC takes a reading of the analogue voltage and stores the result into two 8 bit registers inside the PICmicros memory. The read functions simply get hold of this result.