Connecting bluetooth and lcd eblocks to a PCB

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

Moderators: Benj, Mods

Post Reply
stephenmccarthy
Flowcode V4 User
Posts: 36
Joined: Tue Mar 01, 2011 7:51 am
Has thanked: 7 times
Been thanked: 1 time
Contact:

Connecting bluetooth and lcd eblocks to a PCB

Post by stephenmccarthy »

Hi guys,

I'm using an 18f448 to calculates a BPM value and send it to the LCD and then to hyperterminal via bluetooth.
Everything works pretty well on eblocks,
So my problem now is when I put my 18f448 on the breadboard and power it. Connect the appropiate pins to a female serial ports that I wired myself and then connect this to the bluetooth eblock and LCD eblock. I cannot get anything from the lcd eblock or the bluetooth eblock will now not connect to hyperterm.
Ive only just tried this and this is the result,
So what I plan on trying next is putting a max232 between the micro and the female serial ports,
Do ye think this will correct the problem?

Thanks
Stephen

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by Jan Lichtenbelt »

Dear Stephen

Did you connect the power to the LCD and bluetooth blocks?

Regards

Jan

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by Benj »

Hello Stephen,

Do you have a LED or something similar that you can flash to ensure the chip is running. Could be that the oscillator circuit or something else fundemental is not working and this is causing everything else to fail. Once you know your chip is running at the correct speed etc then you can start to troubleshoot the peripherals one at a time until you get to the source of the problem.

stephenmccarthy
Flowcode V4 User
Posts: 36
Joined: Tue Mar 01, 2011 7:51 am
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by stephenmccarthy »

Hi guys,

Hi Jan. Yes, I've ran 13.5 volts to my breadboard from a psu and passed this to the de7805 regulator, i have the micro powered by this and also connected both eblocks to this power. The bluetooth dongle will acknowledge a com port to the bluetooth eblock when it is powered but will not connect it to hyperterm. As for the LED it is powered but the screen will not print.
Hi Ben, yes I have actually just used an LED to check the power is getting to the termianls, and i will now try the led test you recommended on another thread to me, I will let ye know how this goes.
Thanks for both replies!
Stephen

stephenmccarthy
Flowcode V4 User
Posts: 36
Joined: Tue Mar 01, 2011 7:51 am
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by stephenmccarthy »

Hi lads,

I solved the problem, it was that I tought the 18f448 had an internal crystal also i did not use the pull up resistor or tie mclr to high, so I adjusted my code to allow me use an external crystal, I know have a 12Mhz crystal tied to pin 13 and 14. Now both my LCD and Bluetooth work with the micro on breadboards. The only problem to this is I am not sure how to adjust the clock speeds on flowcode to have everything working in sync again?
Regards
Stephen

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by Benj »

Hello,

Clock speed setting is adjusted in the View -> Project options menu. If Bluetooth is working then the baud rate is being calculated correctly which means your clock speed is already probably correct.

stephenmccarthy
Flowcode V4 User
Posts: 36
Joined: Tue Mar 01, 2011 7:51 am
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by stephenmccarthy »

Hi Ben,
I adjusted the clock speed to 12000000 and i can connect to hyperterm but now it will not print messages or values? any idea where i might have gone wrong?
I have not looked at flowcode in a few days because I have been designing the PCB for the micro and sensor. Is there any other setting beside the config and clock speed i might need to alter?

Thanks
Stephen

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by Benj »

Hi Stephen,

Have you seen the Bluetooth manual and examples available from here.

http://www.matrixmultimedia.com/lc_bundle_manuals.php

They should show you how to get up and running.

stephenmccarthy
Flowcode V4 User
Posts: 36
Joined: Tue Mar 01, 2011 7:51 am
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Connecting bluetooth and lcd eblocks to a PCB

Post by stephenmccarthy »

Hi Ben,

I have actually went through the recommended documents thoroughly. So i was quite confused with the problem, however it seems that i have to occasionally reprogram the Bluetooth module on the multiprogrammer again with the example 1 program. Then reprogram it with my project program for it too work. I'm not quite sure why I have to do this? I'm assuming it might have something to do with the volatile memory you mentioned to me on another thread?

Thanks again,
Stephen

Post Reply