Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Programming Windows timers

Status
Not open for further replies.

Bukitoo

Full Member level 2
Joined
Oct 12, 2003
Messages
122
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Location
Argentina
Activity points
1,061
Hi! I want to implement a Application that communicates with a embedded system over MODBUS protocol (over serial line). The specification says that (in RTU mode) the timout between characters mst be 3.5 times one character. That time, at somes boudrates, could be less than 1 ms. How can I make a timer with that resoultion use window OS? Is that possible ?

Thanks In advance
 

swgchlry

Member level 4
Joined
Dec 8, 2003
Messages
70
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
718
us the winos system high resulotion tick count,you can file help in msdn
 

chrisatwan

Newbie level 2
Joined
Sep 6, 2004
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
13
This is what I use when I am writting out in my VB modbus application:

MBrtu.Modbus.Output = SendMessage$

PauseTime = 1 ' Set duration.
Start = Timer ' Set start time.
Do While (Timer < Start + PauseTime) And (MBrtu.Modbus.InBufferCount < 8)
DoEvents
Loop

RecvMsg$ = MBrtu.Modbus.Input


Chris Atwan
 

scr_wld

Junior Member level 1
Joined
Dec 11, 2004
Messages
16
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
106
Hi!
look in this web lvr point com Jan Axelson have a project maybe can help.
if you use ascii no have problem with the time.

best regard
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top