Printable Version | Subscribe | Add to Favourites
<<  1    2    3    4    5  >>
New Topic New Poll New Reply
Author: Subject: DigiDash project [Making up the test PCB!]
tks

posted on 28/11/05 at 07:57 PM Reply With Quote
Hi

the link to the SDK is:

SDK LCD screen...

what i need to know is how can i excute an macro using RS232 or simple
how can i recieve RS232 data in de module...

for example my micro sends the actual RPM the display then executes the adecuate makro for displaying that rpm..

or i remotely choose directly the makro it needs to display..

thas basicly the problem i have....
how can i put the external parameters in the board....

it should be an easy one..

Tks





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 28/11/05 at 08:16 PM Reply With Quote
OK ive had a look at the manual and the emulator, what is it you need help with?
it sound like your not sure about talking to the device via RS-232?

I'd be happy to help you write the basic protocol functionality, im not too hot on assembly although im well versed in C/C++

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Gav

posted on 28/11/05 at 08:38 PM Reply With Quote
ok basically to execute a macro it looks like all you have to do is send:

11 04 1B 4D 4E 01 2C

being
11 = frame packet start
04 = length of the data
1B = escape
4D = M
4E = N
01 = index of the macro you want to execute
2C = checksum

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 28/11/05 at 09:43 PM Reply With Quote
ow wait

sow in fact what i program a big part of it at least is basicly all serial commands!!

pff i oversaw it and thought it where all compiler commands!

in other words.. the compilers commands are the same as the serial commands!

well it makes things realy really clear..

what do you think of the display anyway?
will test the command in VB....

you will hear!

tks

p.s. did you saw any thing from how to recieve something from the device?RS232 settings?

p.s.2 did you read something about that to start you need to set the device in small protocol is there a command for?





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 28/11/05 at 10:23 PM Reply With Quote
Yeah so basically you just sending the bytes down the serial line the same as you would write them in their IDE but wrapped in the frame packet.
as for enabling/disabling the protocol on page 8 their is a paragrah on how to do this, which just look like a jumper setting.
i think your wanting to get events out of it, ie the user pressed an area that is defined as a button etc?
this is on page 8 also, it seems what you do is request the send buffer which it will then send you the event data in a frame packet

perhaps you could poll this data every couple of hundered milliseconds?


edit: yeah the actuall screen seems quite nice will be interesting to see what you can get out of it, although im not too impressed with their macro thingies, perhaps coz ive not looked to deeply into it.


[Edited on 28/11/05 by Gav]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 28/11/05 at 10:56 PM Reply With Quote
mhh

the problem is what do you expect from it.....

i thought it could also calculate....
but what i now basicly gonna do is just send the complete strings from the microcontroller to the display...

sow in stead of making an FuelUP makro where the fuel variable is lifted up and is displayed i just send the complete display command to the screen!

When i started the program i hoped that i would find an recieve command wich will place some value in some variable but this is much much easier and better..

Well in fact the complete menu's! are programmed in the screen...also you can desing your very own buttons checkboxes etc. etc.

Its now clear, the only thing i don't like is that i need to that checksum! altough i can do the MOD function....

also the terminal wich comes with the compiler does most of the dirt jobs and thats not handy full if it isn't told to you..

i still cant send/recieve from the display with the windows terminal..

question of time it will be i hope...





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
tks

posted on 28/11/05 at 11:10 PM Reply With Quote
COM PORT SPY

my idea is do download an comport spy!

with suchs a program i know if the terminal sends settings to the display or not!

atleast i can see data!
i'm still thinking that the SDK terminal sends some crucial data to the display..
because hyper terminal doesn't show nothing....while in the SDK terminal every time i reset it recieves an message.
It only displays it when i put it in SmallProtokoll mode Shift + F8.

lets see what the spy does..

Tks

p.s. do you know a good/free one?





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 28/11/05 at 11:13 PM Reply With Quote
I dont know what i posted will be exactly right, just a guess in the right direction i hope

perhaps if you gonna have a display, lets say your current speed and is ringed by a box for example it looks like you can create a macro for the screen area then just draw over the area inside the box to update the value.

The SDK, presumably if i had a loop back cable and 2 serial ports i could set the emulator listening on one and fire the commands down the other?
if i can get hold of a couple of USB->rs232 (this laptop dosnt have any serial ports) converters ill have a play and see what i can do, perhaps you could send me the macros youve got already and i can see what i can do?

[Edited on 28/11/05 by Gav]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Gav

posted on 28/11/05 at 11:16 PM Reply With Quote
quote:
Originally posted by tks
p.s. do you know a good/free one?


http://www.sysinternals.com/Utilities/Portmon.html

althoguh i think this just shows strings not binary, ive not tested it myself so dont know if you can switvh between the two

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 28/11/05 at 11:28 PM Reply With Quote
mhh

in fact i aint gonna use macro's!
i only use it at the beginning for the basic display settup...

i'm just goona send the commands dedicated to the display

to set the new speed value
and the new water temp / fuel value...

the only thing wich needs some more thingking is how i'm gonna make an RPM bar..... and also an fast one.....

the microcontroller wich i'm gonna use will be able to do 56K serial data at TOP speed...

i would like to do it more with 11K9..its an proven speed for the micro....

the question is wich refresh rate i will get...

For the RPM....

Tks

download an Com port spyer from...
here

i think you will need an real example of the board to be able to see some real port data...

if you play with the eDip240-7 demo program..you can see allot of pos.





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 28/11/05 at 11:33 PM Reply With Quote
i would of thought 56k would be plenty enough, i mean if you were going to be setting each and every pixel in a bitmask that would be a total of what? a little over 4k?
View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 28/11/05 at 11:39 PM Reply With Quote
aahh offcourse

now i know!

The bloody program ask constantly for data! it does just that! offcourse when i typ something it sends it (after an return)

sow in fact the display doesn't is DOMINANT anyway it alsways listens...
and just behaves like an totally slave...

pff what a dump fool...
sow even if you program the SDK to output data..you need to ask the display for the send buffer...

pff totaly other things that i'm working daily.....





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 28/11/05 at 11:46 PM Reply With Quote
quote:
Originally posted by tks
sow even if you program the SDK to output data..you need to ask the display for the send buffer...



Yes!
although remember you wil have to verify the check sum and length then respond with a ACK or NAK

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 29/11/05 at 12:02 AM Reply With Quote
pff

prety f*** complicated...

just respond with ACK

This is some data wich i fetched in the recieve buffer...
106 1B2D 1B56 4145 6520 4944 3250 3034 ..-.V.EA eDIP240
372D 5620 2E31 2034 6552 2E76 2042 5054 -7 V1.4 Rev.B TP
012B 4157 544C 5245 5301 6863 6572 7275 +.WALTER.Schreur
060E 0011 0611 0011 0611 0011 0611 0011 ................

This is the Write buffer(sended to the Display)
12 01 53 66 12 01 53 66 12 01 53 66 12 01 53 66 ..Sf..Sf..Sf..Sf
12 01 53 66 12 01 53 66 12 01 53 66 12 01 53 66 ..Sf..Sf..Sf..Sf

it does this very very fast...sow i think .. means display send me the data from the buffer! Sf will mean ACK!???

on the boot of the program in the display it sends his version to the terminal...

Can you translate it an bit?
I'm not so good with Hex/Binary/DEC/ACII mix.....

wy isn't the thing ASCII based! would be much easyer for me....
i red something about ASCII mode but have no idea...

will need to capture the data from the terminal when i set it on ASCII and look if it sends some different chip out...





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
tks

posted on 29/11/05 at 12:06 AM Reply With Quote
SOW in fact

the send command is only usefull
to be executed one time OR! by the serial MASTER chip because else the display will fill his own buffer....

although would be smart enough to program a space in for the incoming commands i guess..

think i'm getting the clue out of this thing..
In fact its an bit strange communication.
because you do this:
>WHATS YOUR NAME
<ACK
DISPLAY PLACES BOND in his MIND
>TELL ME WHAT YOU HAVE IN MIND
<ACK
<BOND
>ACK

incl. ACK's





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 29/11/05 at 09:29 AM Reply With Quote
im gonna try finding a couple of USB serial converters today, im pretty sure the emulator will listen on a port and act the same as the real display.

i think this is pretty easy, although what i dont understand yet is what the data is that it sends back when a button is pressed for example. im sure i can find out oncei start playing around with it.

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 29/11/05 at 12:48 PM Reply With Quote
yes

again you are faster with it as i'm..

on the emulator you can set it / give it an comport..
and an speed..
it then opens that port and listens to it.

It should be the way for me to program the MCU for the display, i will test it then using the comport and that function.

The only thing i don't know is how can i set the display to ASCII mode because it much easier for me to send #MG etc.
instead of $11 etc..

Hope you soon play with it and tell me your findings...

Tks





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 29/11/05 at 02:21 PM Reply With Quote
quote:
Originally posted by tks
The only thing i don't know is how can i set the display to ASCII mode because it much easier for me to send #MG etc.
instead of $11 etc..
Tks


This should be relativly easy, for example in delphi(my prefered language) i would do something like this to send a basic string:

code:

procedure sendStr(
str : string;
xPos : byte;
yPos : byte);
var
Buffer : array[0..66] of byte;
i : integer;
chk : integer;
begin
try
Buffer[0] := $11; // DC1
inc(chk, Buffer[0]); // increment the checksum

Buffer[1] := Length(str); // len
inc(chk, Buffer[1]);

Buffer[2] := chr('#' ; // escape
inc(chk, Buffer[2]);

Buffer[3] := chr('Z' ; // Text ouput command
inc(chk, Buffer[3]) ;

Buffer[4] := xPos ; // X postion
inc(chk, Buffer[4]) ;

Buffer[5] := yPos ; // y postion
inc(chk, Buffer[5]) ;

//
// strip each letter and put it into the send buffer
//
for i := 0 to Length(str) -1 do
begin
Buffer[6 + (i)] := chr(str[(i+1)]) ;
inc(chk, chr(str)) ;
end;
Buffer[6 + i] := 0; // append the end of string byte
inc(chk, Buffer[6+i]) ;

Buffer[7 + i] := chk mod 256;

//
// send the buffer using your preferred serial comm method
// and check for ACK/NAK
//

except
// do something with the exception
end;
end;



if you look at page 17 of the manual it also tells you the difference between ASCII and binary mode, their dosnt seem to be a way to tell it, its in one or the other, so i presume that it will recognise which mode you are using because of the comma seperating the parameters.

[Edited on 29/11/05 by Gav]

[Edited on 29/11/05 by Gav]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
DorsetStrider

posted on 29/11/05 at 02:57 PM Reply With Quote
Is it too late to make a request for something I'd love to see on there?

I would love a dash with an external air temp display and black ice warning light.





Who the f**K tightened this up!

View User's Profile View All Posts By User U2U Member
tks

posted on 29/11/05 at 06:52 PM Reply With Quote
no problem..

we are just started with the display....

interfacing..... sow no problem at all...

Tks

GAV i use visualbasic!

could you extract what the display was sending theother day?
the strange thing is that the terminal opens the port but when i press Shift F8
then at that point my monitor starts recieving the data!

Sow i pressume it is because the display sended the "GIVE ME THE DATA IN MIND" command right?

sow sending 2 dots means? Give me data
and Sf means ACK?

will make an VB prog...

Did you have the compiler running with this small Delphi prog?





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 29/11/05 at 07:40 PM Reply With Quote
I know you use VB

The above procedure was just an example of how to send the commands using the binary method, it would be very easy to transfer this to VB.

I have not yet been able to hook up the serial leads because i need a pair of USB to RS232 converters and PC world wanted me to pay £40 each! so i didnt get any.

ok Sf is not ACK or NAK, ACK and NAK are standard comms Acknowledge and Negative Acknowledge and are the number 6 and 21 respectively or 06 and 15 in hex.
ASCII characters are in the range of 33 to 255 as numbers any thing below 33 is known as a control character like line feed and carriage return are 10 and 13
the DC1 and DC2 are also standard coms signal numbers.

once i get a couple of coms converters ill be able to help more

[Edited on 29/11/05 by Gav]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 29/11/05 at 08:27 PM Reply With Quote
ok,

sow in fact it recieves 06 => ACK and then 11 00 11 wich means 00bytes in memory.

Then the pc asks again for data with 12 01 53 66 funy 12 + 1 + 53 = 66 sow i think its the checksum??

and then we will recieve again an 06 nad then 11 00 11 not?

Tks





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
tks

posted on 29/11/05 at 08:41 PM Reply With Quote
mhhh

if is end HEX(12) out of the port it says that i sended HEX(52) or so....

mhh almost got it..

Tks





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
Gav

posted on 29/11/05 at 08:52 PM Reply With Quote
yep pretty much so it would be like this

code:

> 11 00 11 // psudo text command
< 06 // response OK
> 12 01 53 66 // get buffer command
< 06 // response ok
< 11 00 11 // response of the get buffer
> 06 // keep it happy by sending ACK


if you have a look on page 16 of the manual, this will give you the format of the returning data, ie the code of the keypads pressed.


also if yuo look further down it says their is a pin you could use as an interupt for when data is available, it might be better to use this rathre than polling the device for data, if your making your own circuit board.

[Edited on 29/11/05 by Gav]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
tks

posted on 29/11/05 at 09:12 PM Reply With Quote
mhhh problem..

When i do this:

MSComm1.Output = Hex(11)
On my monitor it says i have sended the letter B??
when i send "#" it says 23 in my monitor...
sow loooks like an translating problem?

Tks





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
<<  1    2    3    4    5  >>
New Topic New Poll New Reply


go to top






Website design and SEO by Studio Montage

All content © 2001-16 LocostBuilders. Reproduction prohibited
Opinions expressed in public posts are those of the author and do not necessarily represent
the views of other users or any member of the LocostBuilders team.
Running XMB 1.8 Partagium [© 2002 XMB Group] on Apache under CentOS Linux
Founded, built and operated by ChrisW.