Cheap PIC board Sure Electronics DP-113
Moderator: Benj
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Cheap PIC board Sure Electronics DP-113
Cheap PIC board Sure Electronics DP-113
18F4520, 2x16 LCD, 7Seg. display and ICii temp sensor, usb etc.... perfect and cheap!!
Works well with mplabs....
Who has this board working with flowcode4 components?
Everything, except the LCD display seems to works well ....
It seems that the signals are working the other way arround.
Can I somehow do this with Flowcode4 components ???
Thanks ...
18F4520, 2x16 LCD, 7Seg. display and ICii temp sensor, usb etc.... perfect and cheap!!
Works well with mplabs....
Who has this board working with flowcode4 components?
Everything, except the LCD display seems to works well ....
It seems that the signals are working the other way arround.
Can I somehow do this with Flowcode4 components ???
Thanks ...
- 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: Cheap PIC board Sure Electronics DP-113
Hello,
To use the LCD display on that board you simply have to set your LCD component connections up as follows.
D1 -> RD4
D2 -> RD5
D3 -> RD6
D4 -> RD7
RS -> RA3
Enable -> RA0
You will then need to output a 0 to portA bit 2 using a output icon in single bit mode.
There is also a contrast connection on pin RC1 you may need to output a 1 or a 0 to this pin to allow the contrast to work correctly. It could also be a PWM output as the pin has PWM functionality? I would have to see the schematic to know for sure.
Edit: Looking at the source code the contrast pin is a PWM output. You can control this using the PWM component.
To use the LCD display on that board you simply have to set your LCD component connections up as follows.
D1 -> RD4
D2 -> RD5
D3 -> RD6
D4 -> RD7
RS -> RA3
Enable -> RA0
You will then need to output a 0 to portA bit 2 using a output icon in single bit mode.
There is also a contrast connection on pin RC1 you may need to output a 1 or a 0 to this pin to allow the contrast to work correctly. It could also be a PWM output as the pin has PWM functionality? I would have to see the schematic to know for sure.
Edit: Looking at the source code the contrast pin is a PWM output. You can control this using the PWM component.
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
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Thanks Benj...
This is exacly what i did, but it dit not work....
But if you say it should be working that way, I'm on my own doubt
I must have done somthing wrong.... so i will try this again...
Thanks for your response and confirmation on what I thought it meant to be.
Rene
The Netherlands...
This is exacly what i did, but it dit not work....
But if you say it should be working that way, I'm on my own doubt
I must have done somthing wrong.... so i will try this again...
Thanks for your response and confirmation on what I thought it meant to be.
Rene
The Netherlands...
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Bad luck....
Don't work...
Are you sure Enable have to go on RA0 i thought it should go on RA1 ...
Display is doing something... but it looks like chinees, greek or russian characters
Do you have a small working example program ??
Don't work...
Are you sure Enable have to go on RA0 i thought it should go on RA1 ...
Display is doing something... but it looks like chinees, greek or russian characters
![Question :?:](./images/smilies/icon_question.gif)
Do you have a small working example program ??
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Just had a look at:
http://www.tromop.eu/cms/index.php/sure ... assignment
Looking at: E Should be Port A1. So A0 just look s like a typo.
But I'm guessing you have already got E connected to A1 since your display is is initialising OK
If E stayed as connected to A0, then all you will see is black squares (usually)
If Display is showing wrong characters, then problem is either the OSC speed is wrong, or one of the data lines not working correctly.
To elimate OSC speed issues, you can do the LED flash at 1Hz test. I'm guessing it is a configuration issue since:
e.g
RB0 = 1
delay = 500mS
RB0 = 0
delay= 500mS
Loop forever
If you post flowchart you have created for the demo board I will see if i can correct it for you.
http://www.tromop.eu/cms/index.php/sure ... assignment
Looking at: E Should be Port A1. So A0 just look s like a typo.
But I'm guessing you have already got E connected to A1 since your display is is initialising OK
If E stayed as connected to A0, then all you will see is black squares (usually)
If Display is showing wrong characters, then problem is either the OSC speed is wrong, or one of the data lines not working correctly.
To elimate OSC speed issues, you can do the LED flash at 1Hz test. I'm guessing it is a configuration issue since:
So Hardware is OK. Otherwise would not work with mplabsrene wrote:Cheap PIC board Sure Electronics DP-113
18F4520, 2x16 LCD, 7Seg. display and ICii temp sensor, usb etc.... perfect and cheap!!
Works well with mplabs....
e.g
RB0 = 1
delay = 500mS
RB0 = 0
delay= 500mS
Loop forever
If you post flowchart you have created for the demo board I will see if i can correct it for you.
Martin
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Here by the example......
First Row on display show value of counter....
Second row wont work at all....
welcome message looks like chinees
It seams to be that reset display or set cursor don't do a thing.
Could this be a timer problem...oscilator clock is on HS
Program:
Main: main loop
Init: to set all bit and bytes and shows welcome message for 3 sec.
interrupt: to make ~0.5 and ~1 sec trigger with 50Hz 1:256 prescaler @ 12mHz
Call every 0.5 sec diplay update
Diplay: to show counter value at row 0 and shows string on row 2 when button pushed.
If i test this progrma with a 16Fxxx it works fine but not with this sure board ....???
What am I doing wrong...
Thanks
First Row on display show value of counter....
Second row wont work at all....
welcome message looks like chinees
It seams to be that reset display or set cursor don't do a thing.
Could this be a timer problem...oscilator clock is on HS
Program:
Main: main loop
Init: to set all bit and bytes and shows welcome message for 3 sec.
interrupt: to make ~0.5 and ~1 sec trigger with 50Hz 1:256 prescaler @ 12mHz
Call every 0.5 sec diplay update
Diplay: to show counter value at row 0 and shows string on row 2 when button pushed.
If i test this progrma with a 16Fxxx it works fine but not with this sure board ....???
What am I doing wrong...
Thanks
- Attachments
-
- DP113.fcf
- Simple counter to display
- (12.08 KiB) Downloaded 243 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Try this Flowchart.
I have changed:
Osc speed form 19.6MHz to 12MHz. This and watchdog timer could have been causing the issue.
Watchdog timer, Low voltage programming and extended CPU to disabled.
Can you let us know how you get on please.
I have changed:
Osc speed form 19.6MHz to 12MHz. This and watchdog timer could have been causing the issue.
Watchdog timer, Low voltage programming and extended CPU to disabled.
Can you let us know how you get on please.
- Attachments
-
- DP113_Modifed.fcf
- (12.08 KiB) Downloaded 230 times
Martin
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Too bad, the modified version does not work.
I have discovered, If you switched off the power and wait for a few second....switched on the power again and the "welcome message" appears for a few seconds. after about 3 seconds only nonsense appears on the display.
Reset te board with reset botton or switch off power for short time the message don't appears...(only crap)
You can clearly see that the program sends data to the display.
Characters move from left to right ...in regular steps, each time the macro is called
The hardware works fine when I create a program with MPLAB and let it run ..
I have double checked.
Does anyone have a working example with flowcode4 and DP113 board or some other ideas to get it working.
Thanks...
Rene
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
I have discovered, If you switched off the power and wait for a few second....switched on the power again and the "welcome message" appears for a few seconds. after about 3 seconds only nonsense appears on the display.
![Question :?:](./images/smilies/icon_question.gif)
Reset te board with reset botton or switch off power for short time the message don't appears...(only crap)
You can clearly see that the program sends data to the display.
Characters move from left to right ...in regular steps, each time the macro is called
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
The hardware works fine when I create a program with MPLAB and let it run ..
I have double checked.
Does anyone have a working example with flowcode4 and DP113 board or some other ideas to get it working.
Thanks...
Rene
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
![Idea :idea:](./images/smilies/icon_idea.gif)
You are calling the display macro within your timer0 interrupt macro...this is defiantly a big no no. You should never have delays, or call other macros, especially containing delays .e.g Display routines from within a timer0 interrupt macro.
You will get corruption galore.
Instead of calling a macro you can just use an update flag, E.g when display is requiring an update you have got:
Code: Select all
If Update_display
Then Update_display = 0
otherwise
Then Update_display = 1
Code: Select all
If Update_display=0
Then Update_display=1: Call Display Macro
otherwise
Don't Call Display Macro.
Good luck, and fingers crossed.
- Attachments
-
- DP113_Modifed2.fcf
- (12.43 KiB) Downloaded 224 times
Martin
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Grrrrrrrrrrrrrr......
No Luck, again.
I hope not "flow code" only works with e-Blocks
Perhaps the problem is the LCD display itself.
My board is a "Sure" DB DP113v319 board.
This is different than the board in the user's guide.
The user guide has an 2x20 display, similar to EB005.
My board has a 2x24 display ... can be the problem?
Will it be usefull to try the EB005 with the "sure board" to see if that will work ?
I've tried the 7Seg. display aswell.
For this to work you need to modify the C code.
Does not work with standard flowcode.
I hope someone has a solution and a working program to post.
just show two roles of text will be fine... to start with.
Rene
![Evil or Very Mad :evil:](./images/smilies/icon_evil.gif)
No Luck, again.
I hope not "flow code" only works with e-Blocks
Perhaps the problem is the LCD display itself.
My board is a "Sure" DB DP113v319 board.
This is different than the board in the user's guide.
The user guide has an 2x20 display, similar to EB005.
My board has a 2x24 display ... can be the problem?
Will it be usefull to try the EB005 with the "sure board" to see if that will work ?
I've tried the 7Seg. display aswell.
For this to work you need to modify the C code.
Does not work with standard flowcode.
I hope someone has a solution and a working program to post.
just show two roles of text will be fine... to start with.
Rene
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
![Sad :(](./images/smilies/icon_sad.gif)
Sorry the idea did not work, it was worth a try.
Martin
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
It works !!!!!!
Well, the solution was quite simple.
I have changed all the delays in the "custom code" of the lcdDisplay from 2ms to 4ms.
Now it works, as I would expect it to do ..
We thank all for thinking along and other help...
I am very pleased with the results now ...
Flowcode rocks!
Rene
![Razz :P](./images/smilies/icon_razz.gif)
Well, the solution was quite simple.
I have changed all the delays in the "custom code" of the lcdDisplay from 2ms to 4ms.
Now it works, as I would expect it to do ..
We thank all for thinking along and other help...
I am very pleased with the results now ...
Flowcode rocks!
Rene
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Heck,
I was so happy ...............
But it still do not work quite right ...
There most be something wrong with the timing between flocode and how this board (lcd) works.
To create a simple program, with on line 1 and line 2 a text
Something like "Hello" "World " that should not be too difficult ...???
Yet, I can not get it to work properly...
Same program works fine, if made with MPLAB.
What is wrong between flowcode and this board ?
Are there people who have experience with the DP-113 board and flowcode4 or with other non E-Block PIC boards?
I like to know, what is their experience with these development boards and flowcode4
![Evil or Very Mad :evil:](./images/smilies/icon_evil.gif)
I was so happy ...............
![Razz :P](./images/smilies/icon_razz.gif)
But it still do not work quite right ...
![Question :?:](./images/smilies/icon_question.gif)
There most be something wrong with the timing between flocode and how this board (lcd) works.
To create a simple program, with on line 1 and line 2 a text
Something like "Hello" "World " that should not be too difficult ...???
Yet, I can not get it to work properly...
Same program works fine, if made with MPLAB.
What is wrong between flowcode and this board ?
![Question :?:](./images/smilies/icon_question.gif)
Are there people who have experience with the DP-113 board and flowcode4 or with other non E-Block PIC boards?
I like to know, what is their experience with these development boards and flowcode4
- Attachments
-
- Hello_World.fcf
- Try this... what's wrong
- (11.64 KiB) Downloaded 168 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Two things.
1) I thought Enable was A1 and not A0 as it is on your flowchart.
2) Try disabling extended CPU.
If I have that enabled with LCD eblock. I get funny characters. As soon as disabled, I get correct characters.
I have had experienced of several non LCD eblocks.
Used three different LCDs without any eblocks at all and all three have worked perfectly.
1) I thought Enable was A1 and not A0 as it is on your flowchart.
2) Try disabling extended CPU.
If I have that enabled with LCD eblock. I get funny characters. As soon as disabled, I get correct characters.
I have had experienced of several non LCD eblocks.
Used three different LCDs without any eblocks at all and all three have worked perfectly.
Martin
- rene
- Posts: 56
- Joined: Sun Sep 13, 2009 11:27 am
- Location: Dordrecht - Nederland
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
How stupid can you get?
Hours I sit staring at that stupid thing.
I have everything checked more than 50 times ....
And never seen that A0 was connected to the enable input ....!!!!!
Really I am ashamed that I ever seen.
I had everything and everybody blamed .... but the problem was myself ...
Sorry, and thank you to solve it.
Rene
Hours I sit staring at that stupid thing.
I have everything checked more than 50 times ....
And never seen that A0 was connected to the enable input ....!!!!!
Really I am ashamed that I ever seen.
![Embarassed :oops:](./images/smilies/icon_redface.gif)
I had everything and everybody blamed .... but the problem was myself ...
Sorry, and thank you to solve it.
Rene
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Cheap PIC board Sure Electronics DP-113
Your welcome,
and that does not make you stupid.
We all miss things from time to time (especially me
). It's called being human!
Just glad your up and running. That's what's important![Smile :)](./images/smilies/icon_smile.gif)
and that does not make you stupid.
We all miss things from time to time (especially me
![Razz :P](./images/smilies/icon_razz.gif)
Just glad your up and running. That's what's important
![Smile :)](./images/smilies/icon_smile.gif)
Martin