EB006-8 LCD problem with PIC16F1937
EB006-8 LCD problem with PIC16F1937
Hello
I am working on my last years project, where I need to make a bluetooth connection with my phone and a robot.
The problem is, I was testing this at school, but when I try it at home, the LCD is acting weird.
when I upload a simple program that just shows "TEST" on the displays, It sometimes shows arrows and underscores or the upper line of the LCD is just black.
I am using the version 8 EB006 programming board, but I don't know if it are problems with the configuration, or with the driver to program the board. I was having problems installing the driver on my windows 8 pc, because the driver wasn't digitally signed, and the security of windows 8 was blocking it. I do have the driver now, but the LCD acts weird.
Can someone tell me what's the problem?
thanks.
I am working on my last years project, where I need to make a bluetooth connection with my phone and a robot.
The problem is, I was testing this at school, but when I try it at home, the LCD is acting weird.
when I upload a simple program that just shows "TEST" on the displays, It sometimes shows arrows and underscores or the upper line of the LCD is just black.
I am using the version 8 EB006 programming board, but I don't know if it are problems with the configuration, or with the driver to program the board. I was having problems installing the driver on my windows 8 pc, because the driver wasn't digitally signed, and the security of windows 8 was blocking it. I do have the driver now, but the LCD acts weird.
Can someone tell me what's the problem?
thanks.
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Hello
Do you use the EB005 lcd display or a custom ?
When you use the EB005 (DEFAULT jumpers set) then connections are by default set to PortB (0-Bit0,1-Bit1,2-Bit2,3-Bit3,4-RS,5-E) when using component.
My bed is to re-check these six connections.
Regards,
Do you use the EB005 lcd display or a custom ?
When you use the EB005 (DEFAULT jumpers set) then connections are by default set to PortB (0-Bit0,1-Bit1,2-Bit2,3-Bit3,4-RS,5-E) when using component.
My bed is to re-check these six connections.
Regards,
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
Re: EB006-8 LCD problem with PIC16F1937
Yes I am using the EB005, I've checked all the connections, but everything is connected correctly, the LCD is also connected to PORT B of the programmer board.
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Witch PIC are you using, you can attach your .fcf file if you want so we can test it.
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
Re: EB006-8 LCD problem with PIC16F1937
I am using the bluetooth solutions board with a PIC16F1937. The program I am trying to use is a program directly from the matrix multimedia site. (the only thing I have to do is to schange the chip in the program) This program has worked once before on school.
This program is attached (the chip in the program is still the 16F977A, but before I upload, I change the chip number tot 16F1937)
I've already tried to change the printASCII's into printstrings, and I've also made a brand new program to just print the string "TEST", but that won't work either.
This program is attached (the chip in the program is still the 16F977A, but before I upload, I change the chip number tot 16F1937)
I've already tried to change the printASCII's into printstrings, and I've also made a brand new program to just print the string "TEST", but that won't work either.
- Attachments
-
- commando's lezen.fcf
- (16.32 KiB) Downloaded 333 times
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Can you test this file ?
I removed the bluetooth component and changed pic to 16f1937.
LCD works on my board without problem with this code.
One thing also, I had to rename your file because of " ' " sign not recognized by compiler.
I removed the bluetooth component and changed pic to 16f1937.
LCD works on my board without problem with this code.
One thing also, I had to rename your file because of " ' " sign not recognized by compiler.
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
Re: EB006-8 LCD problem with PIC16F1937
I can't open your file, it says "unexpected file format" But I've tried making a new program, called flowcode1, and that one didn't work either.
I think it is something with either the board itself or The EB006 v8 USB driver, I had problems before downloading the compiler because it said that there were soms changes after the final edition, so it wasnt digitally signed.
I think it is something with either the board itself or The EB006 v8 USB driver, I had problems before downloading the compiler because it said that there were soms changes after the final edition, so it wasnt digitally signed.
Re: EB006-8 LCD problem with PIC16F1937
I think that the code's are sent wrong, for example:
If I send a program that keeps wirting a "2", this is what I get:
http://prntscr.com/3o20by
If I send a program that keeps wirting a "3", I am getting this:
http://prntscr.com/3o20gy
If I send a program that keeps wirting a "2", this is what I get:
http://prntscr.com/3o20by
If I send a program that keeps wirting a "3", I am getting this:
http://prntscr.com/3o20gy
Re: EB006-8 LCD problem with PIC16F1937
It seems to be a problem with the crystal on the board, when I change the program to use the internal clock, the display works.
But if I try to put a bluetooth command in the program, the program stops at that command.
But if I try to put a bluetooth command in the program, the program stops at that command.
- Crenwick
- Posts: 127
- Joined: Sun Aug 07, 2011 1:40 pm
- Location: Belgium
- Has thanked: 7 times
- Been thanked: 21 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
The standard delivered quartz on EB006 board is a 19.6608Mhz . That should match the settings in Flowcode.
Bernard
Flowcode 6 / EB006-V9
Flowcode 6 / EB006-V9
Re: EB006-8 LCD problem with PIC16F1937
It is the right crystal, and the settings in flowcode are also for that crystal.
Do you need to put the connector above it on OSC or on A6&7? It s now on OSC.
Do you need to put the connector above it on OSC or on A6&7? It s now on OSC.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Set it to OSC to use the crystal. I found in the past it sometimes helps to remove the jumpers and reseat them.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: EB006-8 LCD problem with PIC16F1937
that doesn't help, I am working on the internal clock now, but I can't figure out how to send the setup commands without the bluetooth commands (if I use buetooth commands the program freezes, if I use RS232 signals, the commands are send but I can't connect to the board)
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Have you tried the basic one second flasher to see if your oscillator settings are correct? Just create a loop that turns a led on, delay 1 second, turn led off, delay 1 second. Use a stopwatch time the amount of time required to have the led turn on 10 times. That should be 20 seconds (or very near). If not you clock is not working as expected.
The bluetooth module is connected to the serial port of the controller. If the clock setting are not right the serial port will not use the correct baud rate, probably resulting in the bluetooth module not understanding anything the controller sends it.
The bluetooth module is connected to the serial port of the controller. If the clock setting are not right the serial port will not use the correct baud rate, probably resulting in the bluetooth module not understanding anything the controller sends it.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: EB006-8 LCD problem with PIC16F1937
the problem is, I don't have any led's nearby. The only thing I have is the bluetooth solutions kit with a LCD, a keypad, 8 buttons and the bluetooth component.
But the display only works on the internal clock, but than the bluetooth component doesnt work because the baud rate is wrong.
But the display only works on the internal clock, but than the bluetooth component doesnt work because the baud rate is wrong.
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Which version of flowcode are you using?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: EB006-8 LCD problem with PIC16F1937
Two (of many) ways forward:
1) You create a simple 1 second flasher (LED connected to port A0) with all the right settings for a 19.6608MHz crystal and I'll upload it and provide you with measurements.
2) You find a shop selling a LED and a resistor, invest about one euro and you'll be able to test yourself.
1) You create a simple 1 second flasher (LED connected to port A0) with all the right settings for a 19.6608MHz crystal and I'll upload it and provide you with measurements.
2) You find a shop selling a LED and a resistor, invest about one euro and you'll be able to test yourself.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: EB006-8 LCD problem with PIC16F1937
I don't have the bluetooth tolutions board at home now, It is back at school, so I don't need any more help on this.
Thanks for the help anyway.
Thanks for the help anyway.
- 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: EB006-8 LCD problem with PIC16F1937
Flowcode v5 did have a problem with the LCD and the 16F1937 device.
Basically the device has a Port and Lat register and the standard LCD component code defaulted to Port instead of Lat for the device which at 19.6608 MHz results in read/modify/write type glitches.
I believe we fixed this for 5.5 but you can check by looking at the C code, the bug free version should look something like this.
and the define "MX_LCD_PORT_LAT" should be in the code from the FCD file which is right at the top of the generated C file.
If you need to override then use the custom code on the v5 LCD component to set the #if in the defines code section to something like this.
Basically the device has a Port and Lat register and the standard LCD component code defaulted to Port instead of Lat for the device which at 19.6608 MHz results in read/modify/write type glitches.
I believe we fixed this for 5.5 but you can check by looking at the C code, the bug free version should look something like this.
Code: Select all
#ifdef FC_CAL_PIC
#if MX_CLK_SPEED >= 32000000
#define %a_PORT0 lat%b
#define %a_PORT1 lat%c
#define %a_PORT2 lat%d
#define %a_PORT3 lat%e
#define %a_PORT4 lat%f
#define %a_PORT5 lat%g
#else
#ifdef MX_LCD_PORT_LAT
#define %a_PORT0 lat%b
#define %a_PORT1 lat%c
#define %a_PORT2 lat%d
#define %a_PORT3 lat%e
#define %a_PORT4 lat%f
#define %a_PORT5 lat%g
#else
#define %a_PORT0 port%b
#define %a_PORT1 port%c
#define %a_PORT2 port%d
#define %a_PORT3 port%e
#define %a_PORT4 port%f
#define %a_PORT5 port%g
#endif
#endif
#else
#define %a_PORT0 port%b
#define %a_PORT1 port%c
#define %a_PORT2 port%d
#define %a_PORT3 port%e
#define %a_PORT4 port%f
#define %a_PORT5 port%g
#endif
If you need to override then use the custom code on the v5 LCD component to set the #if in the defines code section to something like this.
#if MX_CLK_SPEED >= 16000000
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: EB006-8 LCD problem with PIC16F1937
I am getting this code in the V5.5.2.1:
But I don't have the bluetooth solutions board anymore (it is back at school now) And I'm testing directly on the Elektor Proton robot with a 16F887, so I don't have the problem anymore.
But thanks for the help.
Code: Select all
#ifdef FC_CAL_PIC
#if MX_CLK_SPEED >= 32000000
#define LCD_1__PORT0 latb
#define LCD_1__PORT1 latb
#define LCD_1__PORT2 latb
#define LCD_1__PORT3 latb
#define LCD_1__PORT4 latb
#define LCD_1__PORT5 latb
#else
#ifdef MX_LCD_PORT_LAT
#define LCD_1__PORT0 latb
#define LCD_1__PORT1 latb
#define LCD_1__PORT2 latb
#define LCD_1__PORT3 latb
#define LCD_1__PORT4 latb
#define LCD_1__PORT5 latb
#else
#define LCD_1__PORT0 portb
#define LCD_1__PORT1 portb
#define LCD_1__PORT2 portb
#define LCD_1__PORT3 portb
#define LCD_1__PORT4 portb
#define LCD_1__PORT5 portb
#endif
#endif
#else
#define LCD_1__PORT0 portb
#define LCD_1__PORT1 portb
#define LCD_1__PORT2 portb
#define LCD_1__PORT3 portb
#define LCD_1__PORT4 portb
#define LCD_1__PORT5 portb
#endif
But thanks for the help.