Search found more than 1099 matches

Return

by fotios
Tue May 08, 2012 9:06 am
Jump to forum
Jump to topic

Re: Quad Encoder!

Good morning to all I have to add some thoughts: One of the dominant efforts of all manufacturers of micros, is to incorporate into these as much peripherals as possible thus minimizing the need of use external components. In this direction have been incorporated e.g. the internal pull-ups. So it sh...
by fotios
Tue May 08, 2012 12:59 am
Jump to forum
Jump to topic

Re: Quad Encoder!

Jorgen, Here is a fcf to try your encoder with a LCD. You can run it on simulator as well. It should be noted that the code increments or decrements the counter by "1" per each detent, and that is the correct. For this reason only the IOC (Port) interrupt of Port RB.7 is used. If both outp...
by medelec35
Mon May 07, 2012 8:41 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi Jorgen,
Do you want to try this one:
viewtopic.php?f=26&t=8773#p26697
I also used the Bourns encoder. If you look at the top post you will see all the details.

There are other examples to try as well, if you look at the whole thread.

Martin
by JohnCrow
Mon May 07, 2012 7:22 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi
Mine does that with the E block one
I suspect its a limitation in the encoder
by Benj
Wed May 09, 2012 9:28 am
Jump to forum
Jump to topic

Re: Quad Encoder!

Hello Jorgen, Hm thats strange that it's not working for you when compiled with v5.2. I guess the wait until macros are getting stuck for some reason. In v5.2 we have implemented full debounce on switch inputs so this could be the issue. In the properties for both the switch components the debounce ...
by JohnCrow
Wed May 09, 2012 6:59 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi Jorgen Ive just tried your flowchart Works fine as is in FC4 Did not work in FC 5.2 as you say Just tried changing the switchs to active low (from active high) it now works on my system Bourn5-Active Low.fcf TW-700198.pdf Im using an Alpha Rot Enc (318-ENC130175F-12PS) A & B have 10k pullups ...
by medelec35
Wed May 09, 2012 8:15 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi Jorgen. The only thing with switches that have to WaitTillHigh and WaitTillLow, is if encoder not moving then your program is halted until encoder moves again. I have modified a flowchart for your encoder then will used port B interrupts for encoder detection, so your program can be doing other t...
by Benj
Thu May 10, 2012 9:49 am
Jump to forum
Jump to topic

Re: Quad Encoder!

Hello Martin, Aha thanks for the bug spot and looking into the assembler. I have managed to fix the bug now so that the wait until macros now work correctly with the switch and switch bank components. The switch was being read in and then compared against the polarity mask which could only ever be 0...
by medelec35
Thu May 10, 2012 12:07 am
Jump to forum
Jump to topic

Re: Quad Encoder!

I had a look at the assembly of a switch routine which is not working and this does not make sense to me: label1 BCF STATUS, RP0 DECF FCD_SWITCH_00055_1_switchval, W BTFSC STATUS,Z RETURN MOVLW 0x02 ANDWF gbl_porta, W MOVWF FCD_SWITCH_00055_1_switchval GOTO label1 But nothing to store result in DECF...
by medelec35
Thu May 10, 2012 8:08 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

I have also tested my bourns encoder with your original flowchart. I can confirm that with both FC4 and FC5 LCD dispaly was changing up and down in the same way. My only comment is the routine works but it does get a bit confused some times on both FC4 and FC5 to if it wants to detect up or down whe...
by medelec35
Thu May 10, 2012 7:13 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

I also have tested 4 switch components connected from A0 to A4 on both WaitUntilHigh and WaitUntilLow.
All now works as expected.

Martin

Edit just tested FC4 switch component, and FC5 now behaves in an identical manor to FC4 .
by JohnCrow
Thu May 10, 2012 6:58 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi Jorgen Ive just re tried your program (bourne5) with the new switch components. It now works fine with the switches in active high or low. with the old versions it didnt work with active high The fact I'm using a different encoder is certiainly making some difference to the tests. Alpha Encoder 2...
by medelec35
Wed May 09, 2012 10:18 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi Jorgen, I believe I know whats going wrong with V5? The switch component to do with Switch(1) (port A1) could be bugged? WaitUntilLow or WaitUntilHigh functions don't work Switch(0) is working as expected Attached is a is a workaround until issue can be resolved Can you let me know if it works li...
by JohnCrow
Thu May 10, 2012 8:32 pm
Jump to forum
Jump to topic

Re: Quad Encoder!

Hi Jorgen Great to hear you've got it working. Thanks for letting us know. After once again having copied (overwrite) the new files, restarted my computer and compiled programmed the pic, I find when I change/update the component files this method works for me Close flowcode Make a copy of the file ...
by dazz
Sat May 12, 2012 5:04 pm
Jump to forum
Jump to topic

Re: 16f628a

Hi jordy i was typing a reply have a quick read here http://www.best-microcontroller-projects.com/pic-microcontroller.html as it explains the differences between adc and comparators hth
by BChappy
Sat May 12, 2012 4:57 pm
Jump to forum
Jump to topic

Re: 16f628a

Hi Jorgen,

I'm afraid that the 16F628A has only 2 analogue comparators, no A/D converters.

The 16F88 is pin compatible and does have A/D.

Best Regards

Brian
by JohnCrow
Sun May 20, 2012 10:09 am
Jump to forum
Jump to topic

Simple Digital Thermometer

Simple Digital Thermometer Introduction My earlier temperature projects have all used the LM35 device. This is a 3 pin device in either a TO-92 or TO-202 style package. The device comes in a few different accuracies, but all operate with the same basic 10 mV/°C output. The main problem with the LM3...
by medelec35
Wed May 23, 2012 7:29 am
Jump to forum
Jump to topic

Re: Copy/paste variable

Hi Jorgen, If you export a macro, all the variables within that macro will also be exported with it. If you then use import function on your new flowchart, the variables contained within macro will also get imported, Export & Import can be found within the macro menu. If you want to export Main ...
by medelec35
Wed May 23, 2012 1:22 pm
Jump to forum
Jump to topic

Re: Copy/paste variable

I have just checked, and FC5 does not export/import like FC4 does. You are correct, no variables gets imported at all! So there is either a different way to do this, or there is a bug with FC5 or this method of importing variables has been deliberately removed? Shame if the latter. My guess is a bug...
by JonnyW
Wed May 23, 2012 1:33 pm
Jump to forum
Jump to topic

Re: Copy/paste variable

Hi. Yes, we've seen this! As I haven't done anything specifically with the import and export for v5, I think this will be a bug. I'll take a look and let you know of anything, though its likely this will be fixed only in v5.3 which I think we will be releasing at the time of the ARM/AVR/dsPIC varian...
by JohnCrow
Fri Jun 01, 2012 8:53 am
Jump to forum
Jump to topic

Re: Simple Digital Thermometer

Hi Jorgen Is it not possible to keep it constant at 1 or 2 decimal places. If, how do you do it. It is posible to fix the length of the decimals when converting a float to string for printing. See this thread. It does need you to edit one of the flowcode files, so for this application Im happy with ...
by Benj
Mon Jun 11, 2012 9:50 am
Jump to forum
Jump to topic

Re: DS1820

Hello Jorgen,

What happens if you make Temp2 a Unsigned Int in the variable manager? Does this help at all?
by Benj
Tue Jun 12, 2012 9:30 am
Jump to forum
Jump to topic

Re: DS1820

Hello Jorgen,

You might be able to do something like this.

LCD Print Number Temp2

Decision Temp2 < 10

Yes: LCD Print Number 0
by Jan Lichtenbelt
Mon Jun 25, 2012 12:49 pm
Jump to forum
Jump to topic

Tunning internal oscillators

I wanted to tune the frequencies of 2 microcontrollers with only internal oscillators to get frequencies as close as possible to each other. The solution is easy. Just tune 1 microcontroller by means of the byte OSCTUNE with bits TUN <5:0>. This can be made visual with software RS232 outputs of both...