EB005 LCD module - problem with XTAL

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
d2squared
Posts: 5
Joined: Sun Nov 25, 2012 6:50 pm

EB005 LCD module - problem with XTAL

Post by d2squared »

Hello everyone!

I hope this finds you well. I'm very new to E-blocks, more comfortable with assembler and building my own circuit. however, I have a coursework to complete with E-blocks :? I have to display some messages on the EB005 LCD block and so I went through the example 5 on "C for 16 series PICmicro MCUs". the setup page instruct to flick switch S2 on the Multiprogrammer (EB006) to XTAL, switch S1 can be left in any position; in the code the compiler knows that the clock frequency is 19.66MHz (#pragma CLOCK_FREQ 1966...) and the PIC is configured to use a High-Spped crystal oscillator (HS).
Both E-blocks are powered up via the power supply. all other jumpers have been positioned according to the setup and I'm using a PIC16F877A (also the device select in SourceBoot C is the POC16F877A).
The code builds, compiles, links successfully. I'm also able to program the EB006. however it doesn't work! the only way to make it working is to flick s2 to RC and S1 to FAST.

does anyone know why it's doing that?

Thank you!

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: EB005 LCD module - problem with XTAL

Post by JohnCrow »

Hi
Not sure if you can to use flowcode for your project, but it sounds as though you dont have the clock set correctly.
i.e you are using the RC setting rather than crystal.

Have a look at my simple example. You will be able to use this in the free version of FC5 and so test your hardware
HelloWorld.fcf
(6.5 KiB) Downloaded 316 times
Please dont double post the same type of question
1 in 10 people understand binary, the other one doesn't !

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: EB005 LCD module - problem with XTAL

Post by Enamul »

Hello

It is always good to test any EB board with the factory test hex file. I am posting here the hex file with instruction in word file how to test it..Hopefully it will help you.
Attachments
EB005 Factory test routine.zip
(643.03 KiB) Downloaded 301 times
Enamul
University of Nottingham
enamul4mm@gmail.com

d2squared
Posts: 5
Joined: Sun Nov 25, 2012 6:50 pm

Re: EB005 LCD module - problem with XTAL

Post by d2squared »

Hi John.

thank you for the swift reply! unfortunately I can't use FC for my project ... I have tried your FC5 example but no luck. I have tried flicking the switches to all different position and I have also tried to loop the two macros but nothing is happening. for my project the clock setting are crucial as I have to use stepper motors. I have done a similar project a few years ago in assembler. I was hoping using C compiler would have been easier but it doesn't look like it.

thanks again
JohnCrow wrote:Hi
Not sure if you can to use flowcode for your project, but it sounds as though you dont have the clock set correctly.
i.e you are using the RC setting rather than crystal.

Have a look at my simple example. You will be able to use this in the free version of FC5 and so test your hardware
HelloWorld.fcf
Please dont double post the same type of question

d2squared
Posts: 5
Joined: Sun Nov 25, 2012 6:50 pm

Re: EB005 LCD module - problem with XTAL

Post by d2squared »

hi enamul,

thanks for the swift reply. I have tried the factory test routine and it's working. I have used the FCF file. at first it gave me a warning: "Unable to create microcontroller 18F550 as the definition file 18F550.FCD is missing or corrupt. [0x201]" ... is it because I'm using the free version of FC5?

thank you
Enamul wrote:Hello

It is always good to test any EB board with the factory test hex file. I am posting here the hex file with instruction in word file how to test it..Hopefully it will help you.

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times

Re: EB005 LCD module - problem with XTAL

Post by Enamul »

Here is the code with PIC16f877a which can be used with Flowcode free version.
Attachments
EB-005-12-3.fcf
(12.49 KiB) Downloaded 296 times
Enamul
University of Nottingham
enamul4mm@gmail.com

d2squared
Posts: 5
Joined: Sun Nov 25, 2012 6:50 pm

Re: EB005 LCD module - problem with XTAL

Post by d2squared »

works like a charm! thank you ever so much for that. I think I understood what's going on here: I believe it has to do with the installation of the various softwares and drivers. I have removed and reinstalled PPPv3 (installed version v3.9) and FC5 for PIC (free version). thus I opened PPPv3 and configured the target device, specifying the oscillator I intend to use (XTAL). as I was not able to compile to chip with PPPv3 opened, I closed it and it worked! now I have to figure out how to make Source Boost work ... any idea enamul?
Enamul wrote:Here is the code with PIC16f877a which can be used with Flowcode free version.

Post Reply