Hello there,
Ive spent the last couple of hours tinkering and playing with my new programmer... Now, I was wondering if I could make a simple oscillator with my development board, There are some timer options in the chip setup, but I dont really know how to use them... I can make an oscillator with a few capacitors etc, but I was hoping there could be an easier way... Also, at the moment... Im using a while loop with flowcode and turning the data pin on and off with a 200 ms delay.
Cheers
Simple Oscillator
-
- Posts: 209
- Joined: Thu Oct 19, 2006 11:46 am
- Location: Bakewell, UK
- Has thanked: 20 times
- Been thanked: 16 times
- Contact:
Hi Eddie,
You already have made an oscillator, flasing an LED is just that, the knight rider effect programme is effectively a port full of oscillators. Just vary the delays to make any oscillator speed you want up until (about) clock speed/4/4 which is probably around 1MHz.
That is the beauty of PIC's over conventional analogue electronics, all the varying of resistors and capacitors goes out of the window.
Could I suggest looking at the Flowcode tutorials in the learning centre. Working through these will take you a long way to understanding the benefits of E-blocks/Flowcode.
Mark
You already have made an oscillator, flasing an LED is just that, the knight rider effect programme is effectively a port full of oscillators. Just vary the delays to make any oscillator speed you want up until (about) clock speed/4/4 which is probably around 1MHz.
That is the beauty of PIC's over conventional analogue electronics, all the varying of resistors and capacitors goes out of the window.
Could I suggest looking at the Flowcode tutorials in the learning centre. Working through these will take you a long way to understanding the benefits of E-blocks/Flowcode.
Mark
Go with the Flow.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
For a shorter delay you can use a C code block with the following command
then set up a variable in flowcode called var1 and give it a value. The C code block will then delay the value in the variable x 10 micro seconds.
Code: Select all
delay_10us(FCV_VAR1);
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel