Search found 45 matches

by Gary Freegard
Fri Jul 26, 2013 2:46 pm
Forum: Flowcode V5
Topic: USB HID Initialize
Replies: 3
Views: 3935

Re: USB HID Initialize

Hi

I have just used modified Ben's example http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=26&t=6314&p=13074&hilit=descriptor#p13074 for PIC 18F2455. I use portA.0 to show that it has initialized.

All you will need to do is change the pic.

Also you need to have a 220nF cap connect ...
by Gary Freegard
Tue Apr 02, 2013 9:35 am
Forum: Flowcode V5
Topic: Serial to USB "FTDI"
Replies: 13
Views: 7380

Re: Serial to USB "FTDI"

Hi Kersing

The baudrate that is selected when the FTDI or equivalent is connect to the PC must be the same value as was programmed into the PIC.
Unless you write some code to automatically change the baudrate of the PIC to match the FTDI, in the RS232 component the is a macro for
changing the ...
by Gary Freegard
Thu Mar 28, 2013 10:43 am
Forum: Flowcode V5
Topic: 16 bit timer1 formula?
Replies: 13
Views: 10050

Re: 16 bit timer1 formula?

Hi Brandon

Glad to be of help to you.

Just carried out some other tests, Actual Freq should be half of desired:
tmr1h___tmr1l____Desired Freq____Actual Freq
255_____244_____1MHz__________No output
255_____232_____500KHz ________127.7KHz
255_____208_____250KHz_________84.5KHz
255_____16 ...
by Gary Freegard
Wed Mar 27, 2013 6:28 pm
Forum: Flowcode V5
Topic: 16 bit timer1 formula?
Replies: 13
Views: 10050

Re: 16 bit timer1 formula?

Hi Brandon

I too have had similar problems in the past. All I end up doing is adjusting the timer value unto I get what I want.

I use this program http://pictimer.picbingo.com/ .

I ran a version of your program on a 18F2455, using the program above I set tmr1h to 255 and tmr1l to 16 and the ...
by Gary Freegard
Wed Jul 18, 2012 11:47 am
Forum: Flowcode V5 Free Edition
Topic: Frequency counter 35 Mhz
Replies: 50
Views: 42487

Re: Frequency counter 35 Mhz

Hi all

The method used here is described in an old Microchip application note, written in the late 90s which I remember reading :( .
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011033
The reason that RA3 is connected to T0CKI is to gate the input signal ...
by Gary Freegard
Tue Jul 17, 2012 12:15 pm
Forum: Flowcode V5
Topic: TCS3200 Color sensor Help
Replies: 10
Views: 10370

Re: TCS3200 Color sensor Help

Hi Jordy

The details of the output is on page 4, which shows the frequency for the clear sensor at different wavelengths, and then the percentage of this frequency for each individual colour sensor.

I have created a program to measure frequencies, which you can find here http://www ...
by Gary Freegard
Mon Jul 16, 2012 2:07 pm
Forum: Flowcode V5
Topic: GPS!
Replies: 4
Views: 4553

Re: GPS!

Glad to be of help :D
by Gary Freegard
Mon Jul 16, 2012 10:52 am
Forum: Flowcode V5
Topic: GPS!
Replies: 4
Views: 4553

Re: GPS!

Hi Jorgen

I just had a look at the configuration and currently you have PortB A/D Enable set to configured as analog on reset should be digital as you are using this for the LCD.
And you also have Extended CPU Enabled, not sure what his does but I have disabled this when using 18F2455/4455

Hope ...
by Gary Freegard
Sun Jul 15, 2012 1:09 pm
Forum: Flowcode V5
Topic: Recalling delay time after first cycle
Replies: 31
Views: 22446

Re: Recalling delay time after first cycle

Hi Tony

The example I sent was working, not sure why it isn't now, but it was to show you the basic continuous timer from which you could build on.

I have used Flowcode and E-Blocks to create a camera trigger, but this was to capture pictures of water (aswell as wine and beer) drops/splashes ...
by Gary Freegard
Fri Jul 13, 2012 10:01 am
Forum: Flowcode V5
Topic: Recalling delay time after first cycle
Replies: 31
Views: 22446

Re: Recalling delay time after first cycle

Hi Tony

If you post what you have already got then it shounldn't take too long to alter.

Gary
by Gary Freegard
Tue Jul 10, 2012 10:22 am
Forum: Flowcode V5
Topic: Recalling delay time after first cycle
Replies: 31
Views: 22446

Re: Recalling delay time after first cycle

Hi Tony

The attached file meets your basic requirements.
It consists of 4 macros
timer_update- this is the macro called by the timer interrupt, converts interrupts into seconds and then checks the seconds against target, if target reached then disable timer, pulse the output and then re enable ...
by Gary Freegard
Mon Jul 09, 2012 6:26 pm
Forum: Flowcode V5
Topic: frequency meter tmr2 blunder
Replies: 1
Views: 3076

Re: frequency meter tmr2 blunder

Hi Brandon

Had a look at your program, and was getting a bit confused by the results. :cry:

Have written my own version, differences from yours are:
uses 16f877a
the timer enable and disable are in macros
LCD update is in a macro
uses timer1 as counter
main is used to initialize and has an empty ...
by Gary Freegard
Fri Jul 06, 2012 10:14 am
Forum: Flowcode V5
Topic: USB HID Keyboard on PIC18F14K50
Replies: 5
Views: 5514

Re: USB HID Keyboard on PIC18F14K50

:D
by Gary Freegard
Tue Jul 03, 2012 12:11 pm
Forum: Flowcode V5
Topic: USB HID Keyboard on PIC18F14K50
Replies: 5
Views: 5514

Re: USB HID Keyboard on PIC18F14K50

Hi Dave

The problem is that you have not sent a zero data straight after the key data.
So in you flowchart straight after the
  • test[2]=0x59
    SendDataDirect[test]
add
  • test[2]=0x00
    SendDataDirect[test]
This will cause the pc to respond to the simulated key press.

Good luck

Gary
by Gary Freegard
Tue Jul 03, 2012 10:28 am
Forum: Flowcode V4
Topic: Why not:Flowcode USB serial -Detailed process
Replies: 5
Views: 6180

Re: Why not:Flowcode USB serial -Detailed process

Hello

From looking at the program the issue is the configuration of the PIC.

The required information is on page 3 of the link that Ben sent, and I have attached 3 images of the config that I use.
This is for a 18F2455 which is the 28pin version of the 18F4550.

Good luck

Gary

config1.jpg ...
by Gary Freegard
Wed Jun 27, 2012 2:26 pm
Forum: Flowcode V4
Topic: Measure Time
Replies: 3
Views: 4824

Re: Measure Time

Hi Mika

You may find this link useful, hopefully
http://www.matrixmultimedia.com/mmforum ... =29&t=9088

Jan was having an issue with his code, I came up with two alternative methods for him and then eventually decided to solve the problem :D

Good luck

Gary
by Gary Freegard
Wed Jun 27, 2012 2:15 pm
Forum: Flowcode V4
Topic: GPS from Polstar
Replies: 13
Views: 11044

Re: GPS from Polstar

Hi Bill

Not sure if this could help you, but I did modify the GPS example to help Jorgen
http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=29&t=9141

But also if you know the GPS format you can check to see if the Flowcode GPS module is looking at the right part, by having a look at GPS ...
by Gary Freegard
Wed Jun 27, 2012 2:00 pm
Forum: Flowcode V4
Topic: Speedometer
Replies: 2
Views: 4653

Re: Speedometer

Hi Willem

I think your problem is that your are trying to carry out float maths on an integer. I have made the changes for you, have not tried it myself so no 100% guarantee :D , but should point you in the right direction.

Goodluck

Gary
by Gary Freegard
Fri Jan 20, 2012 4:56 pm
Forum: Flowcode V4
Topic: LED7SEG 0-999
Replies: 4
Views: 4050

Re: LED7SEG 0-999

Hi

I have made two changes, have moved one LED to port C and have removed the 2 second delay.

The problem with using LED 7 segments is that they use at least 7 IOs just for the number (8 with decimal point) and also they have an additional connection so that only the correct display is 'enabled ...
by Gary Freegard
Mon Jan 09, 2012 1:26 pm
Forum: Flowcode V4
Topic: measuring pulsewidth
Replies: 6
Views: 6703

Re: measuring pulsewidth

Hi Brandon

After reading the datasheet http://ww1.microchip.com/downloads/en/devicedoc/41262a.pdf Chapter 14 figure 14-6, this shows that all the interrupts have the same priority, as Jac said, so its first come first serve.

I have made a few of changes to your program
Using 16F877A at 19.6MHz ...
by Gary Freegard
Sun Jan 08, 2012 10:51 am
Forum: Flowcode V4
Topic: measuring pulsewidth
Replies: 6
Views: 6703

Re: measuring pulsewidth

Hi Brandon

Have a look at this http://www.matrixmultimedia.com/mmforum ... =29&t=9088 , as Jan wanted to do the same.
May give you other options/ideas.

Gary
by Gary Freegard
Fri Jan 06, 2012 10:56 am
Forum: Flowcode V4
Topic: Calculation of azimuth
Replies: 2
Views: 3390

Re: Calculation of azimuth

Hi Monie

The link you gave is for R code, here is a link with an in depth description and some code http://www.nrel.gov/docs/fy08osti/34302.pdf
One problem with using a Pic for this is that Sin,Cos etc is not a built in function and therefore you will need to calculate it, here are some of the ...
by Gary Freegard
Thu Jan 05, 2012 5:30 pm
Forum: Flowcode V4
Topic: temperature controll
Replies: 3
Views: 3281

Re: temperature controll

Hi

I would try the following, or something similiar
  • if (new_temp-old_temp) > 0 then temp_up = 1
    if (new_temp-old_temp) < 0 then temp_up = 0

    if new_temp <=22.8 AND temp_up = 0 then heater on
    if new_temp >=22.1 AND temp_up = 1 then heater off
Goodluck

Gary
by Gary Freegard
Thu Jan 05, 2012 3:58 pm
Forum: Flowcode V4
Topic: ECIO Bootloader
Replies: 4
Views: 4416

Re: ECIO Bootloader

Hi

Dont need to remove R4, pin E2 is available and if tied to ground then no bootloader :D
Have just tried and it works :D

The same cound be done on ECIO 28 with pin A5.

Gary
by Gary Freegard
Thu Jan 05, 2012 3:12 pm
Forum: Flowcode V4
Topic: ECIO Bootloader
Replies: 4
Views: 4416

Re: ECIO Bootloader

Hi Steve

Thanks for that, no rush for it just a question I had to ask.
Will have a try with just removing R4 after I have finalised the code. Another option is after removing R4 is to connect these pads to pins 11 and 12 (ECIO 40), and design the pcb with 150ohm resistor and switch across these ...