Page 2 of 2
Re: 1st project issue/LED-LCD
Posted: Fri Oct 03, 2008 8:43 am
by Steve
If you post a list of the required connections to your PICmicro, I'll write a simple program using the inetrnal oscillator for you.
Re: 1st project issue/LED-LCD
Posted: Sat Oct 04, 2008 2:02 pm
by boa279
Here is a schematic...is this at least correct?
Re: 1st project issue/LED-LCD
Posted: Mon Oct 06, 2008 8:36 am
by Steve
Sorry, but I don't know if that is wired correctly because I know nothing about the LCD module you are using.
If you just give me a list which says which pins of the '88 are connected to which pins of the LCD (e.g. A0 <-> RS), I'll write a quick sample porgram that should work for your hardware.
Re: 1st project issue/LED-LCD
Posted: Fri Oct 10, 2008 8:06 pm
by boa279
Well, I started my flow code from ground zero and it works perfectly!! Don't know whats wrong with the original code but I suspect it had a lot to do with the multiple changes I made while building it. (variables that were there but not used..maybe the interupt I was using which was also a data output to lcd....stuff like that) Anyway...with the 16f88 it works perfectly when speed is set to 31250 as described here:
http://www.matrixmultimedia.com/mmforum ... lit=osccon
I cannot however get it to work with the variable oscillator also described in the above link. Ive attached both versions of the flowcode. The NO_OSCCON.fcf works...The osccon.fcf does not. Can someone help me figure out what Im doing wrong? THANKS A MILLION FOR THE WONDERFUL SUPPORT!!!
Re: 1st project issue/LED-LCD
Posted: Mon Oct 13, 2008 10:58 am
by Steve
I've downloaded and tried both of these programs and they both seem to work fine (at least the LCD is displaying correctly).
Could you also post the C and HEX files for both of these programs - this may help troubleshoot the problem.
Re: 1st project issue/LED-LCD
Posted: Mon Oct 13, 2008 3:50 pm
by boa279
steve wrote:I've downloaded and tried both of these programs and they both seem to work fine (at least the LCD is displaying correctly).
Could you also post the C and HEX files for both of these programs - this may help troubleshoot the problem.
Like I mentioned...the no-osccon file works perfectly on the breadboard but the OSCCON one does not work. I will post the C and HEX but these will be generated from flowcode correct? I will post only the OSCCON C and HEX as the other one operates correctly...just trying to speed the program up as it is a little delayed when buttons are pressed. Just to make sure...have I properly set up the osccon correctly?? Just something else wrong? THANKS!! I will try to post tonight.
Re: 1st project issue/LED-LCD
Posted: Mon Oct 13, 2008 3:55 pm
by Steve
As I said, both of these programs work fine on my hardware, so there is nothing wrong with the programs. The setting of the osccon register is ok.
Perhaps the 2MHz speed is too fast for the breadboard project?
Re: 1st project issue/LED-LCD
Posted: Mon Oct 13, 2008 6:27 pm
by boa279
steve wrote:As I said, both of these programs work fine on my hardware, so there is nothing wrong with the programs. The setting of the osccon register is ok.
Perhaps the 2MHz speed is too fast for the breadboard project?
Hmmm ...I wonder why its not working on the breadboard?.? Im kind of nervous etching out a board in the hopes it will work normally when I can't test it on my breadboard. What "hardware" are you using to get it working? Eblocks? Anyway, here are the C and hex files for both programs.
Re: 1st project issue/LED-LCD
Posted: Mon Oct 13, 2008 6:29 pm
by boa279
and the last one
Re: 1st project issue/LED-LCD
Posted: Mon Oct 13, 2008 6:42 pm
by goldwingers
Hi Boa,
Is the breadboard one of those with all the pins inside and you just push in the chip...components etc, If so it could be a capacitance issue across the pins of the osc pins
Regards
Ian
Re: 1st project issue/LED-LCD
Posted: Tue Oct 14, 2008 3:10 am
by boa279
It is one of those push pin type boards and Ive heard of the capacitance thing assosiated with these prototyping boards...what else can Iuse to test cuircuits without them? Im going to have to try something else.
Re: 1st project issue/LED-LCD
Posted: Tue Oct 14, 2008 8:48 am
by Steve
I tested it on our HP488 development board. You could use Veroboard - we generally use this for very early prototyping.
But I think I've found your problem by file-comparing your 2 C files. The LCD:Cursor commands for your 2 programs are different. The one that works prints out on lines 0 and 1. The one that doesn't work attempts to print out on lines 2 and 3. So if you are using a 2-line LCD, you will not see anything.
Re: 1st project issue/LED-LCD
Posted: Tue Oct 14, 2008 3:02 pm
by boa279
what actually happens is readable but not accurate.
Example:
Fi%sT T^Y:
Transmi@e9n
it displays crazy stuff like that over and over...the program only calls for this once but its like its resetting every second or so and repeatedly trys displaying First test, transmission over and over..buttons do nothing and every now and again it will try to display the other information like Gear: or Mode:
I have veroboard but if im going to use parts I might as well make a real deal board with my fingers crossed. Also, Ive been looking through forums trying to find out how I can set up in circuit programming. I found something that briefly described it but nothing specific. Im trying to use SOIC pics to minimize the space (I also prefer surface mount stuff anyway) and it would be awesome if I could program them on the board as their not so easy to remove when "in place"

Do the connections required for programming apply to all pics or is each type different? I appreciate the help and will crank out a board in the few days! THANKS!
Re: 1st project issue/LED-LCD
Posted: Tue Oct 14, 2008 3:15 pm
by Steve
For in-circuit programming, just expose the following pins on your target board:
RB6
RB7
Vcc
Gnd
MCLR
If you are using the LVP capability of the chip, also expose RB3 (or whatever the LVP pin is).
This should be the same for most of the PIC16 and PIC18 chips.
Re: 1st project issue/LED-LCD
Posted: Tue Oct 14, 2008 4:42 pm
by xtdan
Hi,
We have used several LCD modules quite successfully with Flowcode, both the character type you are using, and a graphic type.
PICs used have been 16F88, 16F877, 16F887. Main thing is don't forget not all PICs have an internal oscillator and need a xtal. (been there done that going from an 88 to an 877, very embarrassing).
We also use these graphic LCD modules in several commercial products written in assembler from pre Flowcode days, and usually get the row of black blocks when there is no comms between the module and PIC. (try powering the module without any of the I/O pins connected just Vdd Vss you should get the same effect).
We have found that veroboard (stripboard) works fine for these sort of prototypes but the plastic breadboards seem to be 'kiss of death' for PIC based prototyping.
Try veroboard and I think you'll be up and running in no time.
Dan
Re: 1st project issue/LED-LCD
Posted: Tue Oct 14, 2008 5:04 pm
by Benj
Hello
Sounds like your internal clock speed is not configured correctly. Have a look at the device datasheet for configuring the osccon setting correctly and then match the Flowcode clock speed setting to the value you have assigned. Also the internal clock speed is a RC type and therefore is subject to change with changes in temp or pressure. Therefore it is not 100% reliable in more extreem conditions even if it is configured correctly. Remember you will need to write the osccon register right at the start of your program before the start LCD macros have been called. It is also helpful to use 2 start LCD macro calls in a row to guarentee that the LCD resets correctly, Use this only if you are having problems now and then initialising the LCD.
Re: 1st project issue/LED-LCD
Posted: Wed Oct 15, 2008 6:46 pm
by boa279
steve wrote:For in-circuit programming, just expose the following pins on your target board:
RB6
RB7
Vcc
Gnd
MCLR
If you are using the LVP capability of the chip, also expose RB3 (or whatever the LVP pin is).
This should be the same for most of the PIC16 and PIC18 chips.
Im not sure what you mean by "expose" those pins...if you mean simply connect those pins to the programmer that would be easy but wouldnt the pic start running its previous program once vcc and vdd are applied?
Re: 1st project issue/LED-LCD
Posted: Thu Oct 16, 2008 8:52 am
by Steve
Your circuit presumably has its own power and ground signals. What you need to do when you want to "in-circuit program" the chip is to disconnect these power rails and have them connected to the programmer board.
The programmer will control the Vdd and MCLR lines to put the chip into program mode.
Re: 1st project issue/LED-LCD
Posted: Sat Nov 08, 2008 3:00 pm
by chevy6600
Hi all, i am having all sorts of problems getting my prog to run in a real situation one of them being to output to the lcd on the v3 dev board, i get the top line blacked out or sometimes corrupt characters, i am trying to find out what causes various probs, so it`s a work in progress.
I have trailed the forum on the various causes so if any one knows of any different causes not yet put in the forum now would be a good time to add here !.
One problem that caused corrupt data on the LCD second line, i discovered can be caused by the `extended CPU enable` (when it was enabled) selection which is listed in the `expert setup` for the chip selection, this is only on some of the chips so not always given as an option.
If i find anything else out i`ll add as and when.
Re: 1st project issue/LED-LCD
Posted: Mon Nov 10, 2008 9:46 am
by Steve
Make sure the clock speed setting within Flowcode is correct for the actual hardware setting. If in doubt, create a simple LED flasher to ensure you can get an LED to blick actuately every second.
Re: 1st project issue/LED-LCD
Posted: Thu Nov 13, 2008 6:36 pm
by jbn.mjohn
SIR I AM JOBIN M JOHN,
I AM VERY INTERESTED IN ELECTRONICS FIELD,BUT I AM VERY WEAK IN PROGRAMMING SIDE. BUT NOW I GOT UR NEW SOFTWARE (FLOW CODE) SIR THIS IS REALLY WONDERFUL AND VERY HELPFUL FOR ME . BUT I HAVE SOME DOUBT ,HOW I CAN MAKE A (0.1MS) DELAY .
Re: 1st project issue/LED-LCD
Posted: Fri Nov 14, 2008 9:29 am
by Sean
The easies way to create delays shorter than 1ms is to use the C function delay_10us().
Simply drag a C icon onto your flowchart and replace the deafult text with the following line:
delay_10us(10);
This example will provide you with a 100us delay.