Search found more than 2552 matches

Return

by medelec35
Tue May 03, 2011 7:35 am
Jump to forum
Jump to topic

Re: Starting internal oscillator on 18F14K22

Hi Amy, Have you used a C block at the beginning of your with an osccon command (e.g osccon = 0x70;) set at a value suitable for your application? Take a look at http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=26&t=6936&p=16368#p16368 There is a bit of information on osccon. Or you ...
by medelec35
Tue May 03, 2011 1:21 pm
Jump to forum
Jump to topic

Re: Wrong timing using internal Clock 16F88 & 12F683

But where is the bug? How can I get the correct pulse widths? Thanks for any help! Hi GerhardB, The problem is caused by 'Auto Clear Watchdog' (in 'View', 'Project options') enabled. When enabled, extra clear watchdog commands are accessed to stop Watchdog time out occurring. If you untick the opti...
by medelec35
Thu May 05, 2011 1:48 pm
Jump to forum
Jump to topic

Re: Floating point

Hi Mario, Try this attachment. If float=1.234567, then 1.23 should be displayed on LCD. I'm not saying this is best or simplest method, but it's the the way I would do it. It is very easy to expand the range (currently float has to be less than 1000). and amount of decimal places. If you want a high...
by medelec35
Sun May 08, 2011 12:31 am
Jump to forum
Jump to topic

Re: Converting Hexidecimal to Integer & Interger to Hexideci

above is created with Flowcode V4 for PIC. Attached are Flowcode V3 for PIC Versions. Martin Edit: :idea: I have altered files so the conversion is done within the conversion macro. That way you just load your game flowchart, and conversion flowcharts. Export conversion macros. Then after you import...
by medelec35
Sun May 08, 2011 12:17 pm
Jump to forum
Jump to topic

Re: Converting Hexadecimal to Integer & Interger to Hexadeci

Here is the latest and best version! (until the next one :P ) It is still created with Flowcode V3, so it will work with both Flowcode V3 and V4 versions This version can convert both ways, using common variables to keep ROM usage down. Both conversions are done within their own macros. so if macros...
by medelec35
Fri May 13, 2011 9:55 pm
Jump to forum
Jump to topic

Re: LCD On PortA ?

It depends on the target device you are using. E.g LCD will not work connected to portA with 16F88. This is because RA5 is input only. Whereas with 16F877A RA0 - RA5 are bidirectional. Although RA4 is open drain, all lines of LCD except Enable (RA5) have pull-ups. That's why LCD works on port A Nice...
by medelec35
Thu May 12, 2011 10:19 am
Jump to forum
Jump to topic

Re: Interrupt and keypad

Hi nmindana, There are a few problems with your Flowchart. 1). configuration. Change settings in Expert Config Screen' (go into the configuration menu ('Chip Configure..') click on 'Switch To Expert Config Screen') there you need to disable watchdog and LVP etc See: viewtopic.php?f=26&t=6936 Oss...
by medelec35
Sat May 21, 2011 8:28 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

If it was me then First, I would determine resonant frequency, by looking on the data sheet or site where you purchased Piezo transducer from. Then I would produce double the frequency using timer interrupt. Then I would connect the Piezo transducer to two pins, which places the transducer in differ...
by medelec35
Sun May 22, 2011 7:08 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

Have a look at the 16F1827. its a powerful chip for the price. That has PLL built in. + 2 CCP chanels so you can control 2 PWM channels etc. It should work with boostc after the planned Flowcode upgrade. Meanwhile should work with Hitec compiler. See: http://www.matrixmultimedia.com/mmforums/viewtop...
by medelec35
Sun May 22, 2011 11:27 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

Hi Thanks, I am using 16f88 as I need 18, I/O pins. No problem. The 16F88 only has 16 I/O pins. But RA5 is I/P only Try this. It is untested on real hardware, and is only just therory. Connect a variable resistor to AN0 Connect the piezo transducer between pins RA1 and RA2 Frequency generated shoul...
by medelec35
Mon May 23, 2011 3:43 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

I did not have a chance to test before posting the Flowchart on the above post. Now I have tested with my hardware, there was a small error within the Flowchart. Here is an improved version which is tested and does work OK. Voltage across A1 and A2 = 10V pk to pk Frequency out (depending on setting ...
by medelec35
Tue May 24, 2011 7:37 am
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

Hi Indana, If you have tested alarm,is pulsed 1Hz fast enough? I can change the pulsed frequency to a different one if necessary. I chose 1Hz because of: Pulse frequency is determined by the control panel but a frequency of 1 second on, 1 second off, is recommended for compliance with BS 5839 Pt1. I...
by medelec35
Mon May 23, 2011 10:40 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

Thanks, I'm glad it works. 1. Presently the tone is continuous, how do I change it to mimic a burglar alarm without reducing the sound level. Done that for you. 2. I am using this as part of a moisture sensing alarm, I use the digital clock example in flowcode for data logging, can I use two TMR0 in...
by medelec35
Wed May 25, 2011 5:46 pm
Jump to forum
Jump to topic

Variable Frequency Generator 500Hz to 5KHz (100 Hz Steps)

I have developed a simple Square wave frequency generator for Flowcode V4, which covers 500Hz to 5KHz in 100Hz steps with Frequency displayed on LCD. Also displayed is byte value of POT connected to RA0. I have used a 16F88 configured for 8MHz internal oscillator. This cuts down component count. You...
by medelec35
Wed May 25, 2011 11:36 pm
Jump to forum
Jump to topic

Re: Variable Frequency Generator 500Hz to 5KHz (100Hz Steps)

For people who are interested, I was asked in a pm how the 10V is generated: To generate 10V pk to pk with a 5V supply. here is a diagram to help illustrate principle On first 1/2 cycle: Simultaneously the software drives RA1 to 5V and RA2 to 0V on the 2nd 1/2 cycle: Simultaneously the software driv...
by medelec35
Mon May 30, 2011 1:58 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

I have modified the Flowchart to allow you to set the sensitivity level. I'm not sure if want alarm to be on if soil goes drier, or wetter. If it's the former then you will need to reverse arrow From Level>Set_Moisture to Level<Set_Moisture The other thing is electrolysis eating away the electrodes....
by medelec35
Tue May 31, 2011 5:02 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

Also can enlighten how you worked out the frequency for 1.8Khz. Thanks Matin Indana :? 1) Interrupt frequency required = 2*required frequency = 2*1800=3600Hz 2) Min prescaller value = Fosc/(4*Fint*256) = 8000000/(4*3600*256)=2.17 Since I want to use a tmr0 to be approx 127ish (since i'ts the middle...
by medelec35
Wed Jun 01, 2011 1:10 pm
Jump to forum
Jump to topic

Re: PIC16F88 error: data memory check failed

You can check config settings by running PPP.
Make sure you select 16F88 first.
Click open then load hexfile.
Click 'View' then select 'View HEX File'
Finally click on 'Config Screen'
Then you will see the normal ppp config screen which shows the config settings.

Martin
by medelec35
Wed Jun 01, 2011 10:19 am
Jump to forum
Jump to topic

Re: connecting lcd

I generally find other LCD’s do work with Flowcode. I have looked at your flowchart and I agree that settings seem correct. Delay at the start: If I was you I would place a 50ms delay at the start of your main program. This allows LCD warm up time. Switch detection: In flowchart Your LCD does not di...
by medelec35
Sat Jun 04, 2011 9:29 am
Jump to forum
Jump to topic

Re: LCD select menu function

A rotary switch is just a switch with one (or more) input(s) and X output(s). This will require X I/O from the microcontroller. And if the number of the outputs of the rotary switch is high, you'll need a lot of I/O and thus a "big" microcontroller. Although that is true, I had a rotary s...
by medelec35
Sat Jun 04, 2011 1:20 pm
Jump to forum
Jump to topic

Re: LCD select menu function

What about if all the lines of menu are in lower case, then as you turn the switch one the selected menu line, changes from lower to upper case? Or the selected menu line, right shifts by a place or 2? Or the selected menu line can flash, whist rest of the menu lines are solid? The idea Spanish_dude...
by medelec35
Sat Jun 04, 2011 3:14 pm
Jump to forum
Jump to topic

Re: LCD select menu function

That's Very good Indana!
I'm sure that routine will come in handy
Thanks for sharing.

I have just added some delays.
See what what you think?
by medelec35
Sun Jun 05, 2011 12:41 pm
Jump to forum
Jump to topic

Re: Driving Piezo with PIC

Hi Indana, Was a good try! I have modifed your flowchart to interface with the frequency generator. See: http://www.matrixmultimedia.com/mmforums/viewtopic.php?f=26&t=8443 So at least when moisture is above a pre-set level then the frequency can be adjusted from 500Hz to 5KHz I have also altered...
by medelec35
Sat Jun 11, 2011 7:17 am
Jump to forum
Jump to topic

Re: KEY PAD

the rows are connected direct to the pic. Hi Mario, That's your problem. If you connect rows directly to pic, then i/p's will be floating with no key pressed. Since i/p resistance will be very high, anything can cause the i/pt o go from logic 0 to logic 1 (including a finger fairly near!) if using ...
by medelec35
Sun Jun 12, 2011 11:58 am
Jump to forum
Jump to topic

Re: KEY PAD

I have edited your Flowchart to enable weak pull-ups. Keypad Columns must be connected to portB, since weak pull-ups are only available for that port. You can connect the rows to rest of port B or port C etc. Hint: If you plan on using ICD, then connect rows to portC. Just make sure you set up the k...