|
Hi Jelle,
since you are transmitting binary data that goes into EEPROM, I assume it is code,
hence all byte values can occur, including the ones you have selected for XON and
XOFF.
If your microcontroller has dataflow handshaking installed, this may go wrong
when it receives these values, intended as data bytes, but interpreted as flow
control characters.
As far as I know there are only three correct approaches to solve this:
1. don't use flow control at all while transmitting binary data
(so set dcb.fOutX and dcb.fInX false).
2. use a protocol, where your bytes are transmitted in another way, that does
not conflict with the selected XON/XOFF characters; several of them are based
on hex, meaning you send two characters to represent one byte. Examples are
"Motorola S-records" and "Intel Hex".
3. use hardware handshake (that's based on some "control lines" such as "RTS" and
"DTR", to be found on some of the connector pins of your serial port.
Of course this requires you change the settings on the PC side, and the code
on the microcontroller side.
Anyway, some kind of protocol would be nice to have, so you do not just send
the data to the microcontroller, but you actually have a conversation, so the PC
keeps informed as to "everything goes well" or "failed to program EEPROM" or
"Done" or whatever.
Your original problem was having "character overrun", that is receiving a
character while the previous character was not yet been read. There must be an
error flag for that in one of the control registers, possibly also an error interrupt.
Hope this helps you to better understand how it works, and how you can improve
the robustness of your communication.
Greetings
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc,
The max bauts I test is 1200 bauts. It works and I do not sent Kb. I try with programming my interrups from the µC for using faster bauts. Now I do it with this. It's fast enof.
Thanks, I let you now of it is works.
Jelle.
|
|
|
|
|
I recently bought a Viewsonic Optiquest Q22wb monitor. It was fairly inexpensive, so I wasn't expecting the excellent results it gives.
The screen is bright, sharp and the colour is exceptional - and that's with the VGA connector - hook up via DVI and it get's even better. The viewing angles are also pretty good.
It's a bit sparse on the optional extras - there are no usb ports or built in speakers, but that doesn't really bother me as I've never had a monitor with them.
In fact the only bad thing about it was that it had a single stuck pixel - happily this was quickly resolved by this handy utility: http://udpix.free.fr/[^]
Recommended.
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
i m planning for usb oscilloscope for pc .
Can someone tell me which micro controller i use, and how to get started?
decided to use C# on pc side.
|
|
|
|
|
Aha, we meet again.
If you want to build an oscilloscope that takes analoge inputs through an
external peripheral, you will need a lot of technologies, including:
- microcontroller software
- analog electronics
- Windows driver
- Windows app
Probably the most important decision is on interfacing; how will your scope
present itself to Windows? i.e. where in "Device Manager" should your device
appear, will it mimic some other device (and piggy-back on its driver), or
will you have to develop your own driver (a major undertaking)?
And a second decision is how to solve real-time problems; whatever the
maximum frequency, resolution, number of channels, your microcontroller will
need a lot of memory, since you will not be able to sink all data to USB in
real-time.
Once you solved these issues, the actual choice of microcontroller is
not that important, pick any one you feel comfortable with; make sure you
get a built-in USB port and some library support for that.
Have you looked at commercially available solutions? They may inspire you.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
never heard about a micro controller with a .net virtual machine. most micro controllers support assembler and/or c only.
Don't try it, just do it!
|
|
|
|
|
To build an oscilloscope, or some other real-time apparatus, the OP will need
both a PC (running .NET would be nice), and some dedicated hardware that needs:
- to interface to the PC, hence best a microcontroller (yes, with asm or C)
- to take care of real-time aspects, hence best a lot of memory
The smallest .NET machine would be a PDA, probably too expensive and lacking
adequate I/O facilities and real-time capabilities. (It could be nice tho
as the GUI part of the scope!)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
When choosing a micro the first task is to work out what you want it to do. Many have built in A to D convertors which you will need (the resolution would not be great but it would get you started).
Also, you need to consider the interface. You can get micros with a USB interface built in and this would make life a bit easier for you. Alternatively, you can use any micro and add a USB interface chip.
FTDI http://www.ftdichip.com do a range of modules which I have tried and got running pretty quickly, you can connect them to your micro using a parallel port or a UART and as well as the chips they sell little modules which get your system up and running very fast. At the PC end I have used both a virtual com port approach and the dll they supply without too much difficulty.
Another big consideration is what development kit is available in your price bracket. Personally I have used the Microchip PIC family alot lately and they have masses of devices and cheap tools. I should also mention Zilog Z8 and the Thompsom ST6 family which are good starter devices.
Good luck, regards
Ali
|
|
|
|
|
Hi Guys
This Question is for any one who has used LaCie Ethernet Disk before
I have 1TB LaCie Ethernet Disk (Gigabit Ethernet - Shared Hard Drive).
I wanted to rest this disk to a different name and IP address but IPConfigurator; a utility provided by LaCie to do this does not do it.
That is you can view the changes made in IPConfigurator but when you connect it to the network its is not recognized by the new name and IP but with the old one.
Any one knows how to do this or at least factory rest it.
-- modified at 5:27 Tuesday 14th August, 2007
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
Hi there. I'm pretty new to coding, I'm trying to (slowly but surely) design a program to receive data from a chassis dyno that I'm fabricating. I'm guessing I'd best use the serial port, from what I read using USB 2.0 is pretty much harder. I'd be putting together a microsystem using either a microprocessor or my own electronics. I'd have to transmit data like engine rpm, air/fuel ratio, dyno drum speed etc. Is there a way to read analogue signals with a pc or can it only use digital signals?
If anyone has some good links or books on communicating with the outside world using a pc, I'd love to have some. Thanks a bunch!
Brian
Yup, I'm a NEWB
|
|
|
|
|
The serial/parallel ports are digital only. If you want/need to send analog output you'd need an external box to take and convert the digital commands into analog signals. Assuming you can get one inexpensively a programmable USB control box would probably be the way to go since legacy ports are in the process of being phased out of new PCs. Programming on USB directly isn't easy since you need to write a device driver to talk to a device on the port instead of being able to directly access it.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Hi,
you can add an analog/digital convertor to your PC but that has a lot of
disadvantages; for one it ties your solution to your PC, you can not easily
move it to another PC, a laptop, etc.
The better solution is to encapsulate the required functionality in a
"peripheral". It could be built around a microcontroller that has both an
A/D convertor and an RS232C interface on board. Of course such device needs
its own code, it may require assembly or C code (it would not support the
.NET languages !)
If you are in control of the details of command/response coding,
you can make sure each of them use readable/printable characters only AND
have a single common terminator (such as a newline character),
making it a lot easier to communicate (and debug!).
If the required bandwidth is low (only a few tens or hundreds of chars/sec),
and if the real-time requirements are easy (you don't need the PC to react
within a few tens of milliseconds), then the serial port is easy and in fact
a very good way for interfacing a peripheral to a PC.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi,
I have to read every output (sensors on the dyno) about once every 50ms. Is serial fast enough?
How bout any books about interfacing with serial and/or USB?
Thanks!
Yup, I'm a NEWB
|
|
|
|
|
Hi,
a Windows PC would be capable of reading say 10 characters every 50 msec on average;
but sometimes it will have more urgent things to do, and it will read and process
the input with a delay of more than 50 msec; if you need a reaction on every
measurement (as is often the case in control engineering jobs), you would be better
to organize that in the microcontroller, and have it communicate with the PC
on a higher level, with no (or more relaxed) timing constraints.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thanks! Now that I know what to do, I just need to find out how to do it
I found a couple of books on C++, and I found Serial Complete and USB complete on amazon. I should be able to get through this with those two hehe Thanks a lot!
Brian
Yup, I'm a NEWB
|
|
|
|
|
If you can read German or feel competent enough to interpret a German article based on circuit layout etc.:
http://www.heise.de/ct/projekte/ct-lab/[^]
ADA Motherboard with up to 5 optional daughter cards (AD / DA / IO), a SDK and other goodies, free of charge (the plans, not any of the hardware - but you can solder the stuff yourself).
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
I need some quick help and i thought of the guru's on this forum. My cd/dvd rom won't read or write to Blank CD's. It reads Blank DVD's but says the file system is raw and has 0 bytes on the blank 700mb cd's.
I've tried to uninstall the cdrom and then searched for added hardware, reinstalled. but still not working. what can i do?
LM9478Y FQQ1200 SCSI CdRom
-and-
HL-DT-ST DVD+RW GWA4164B
show up as disk drives under Hardware
|
|
|
|
|
Well make sure of three things first the cd-rom/dvd rom drives are ok, you may use device manager, then make sure the CDs / DVDs your using are OK this is detected when you insert them and a BLANK CD-ROM is poped up, third make sure the filesystem your chosing and the speed(52X,48X...etc.)are compatible with whats written on the CD-ROM/DVD-ROMS you purchased!If all is true post me again!
To follow the path, Walk with the MASTER, See through the MASTER, Be the MASTER!
|
|
|
|
|
I have a serial interface on a device with 6 pins:
1 NC
2 0v
3 +12v
4 SClk
5 SData
6 0v
Now I want to wire this to a serial Port on a PC, I have wired the 12v and 0v to a molex, but I need to work out were to wire SClk and SData, I'm guessing (on previous experience) that I should be wiring SClk to DTR and SDATA to RX on the RS232.
I'm I warm or completely cold.
BTW: The 12v and 0v and input supply voltages.
-- modified at 9:02 Thursday 9th August, 2007
-- modified at 9:07 Thursday 9th August, 2007
|
|
|
|
|
Hi Roger,
If yo have SClk & SData your serial is what is called synchronous (it uses a clock to sync, the data being read in on each clock pulse). Unfortunately RS232 is Asynchronous (no clock - data bit widths are a fixed time & data bytes begin with a start bit).
I don't know how to connect synchronous serial to a PC - possibly you could do it with the parallel port by toggling the clock and data yourself, or you will need some sort of adaptor.
Sorry its not good news,
(PS I've type this message twice as the first one got lost in the ether - so sorry its brief)
Ali
|
|
|
|
|
Ali, know of a good Sync/Async convertor?
|
|
|
|
|
Hi Roger,
No I am afraid not, its the sort of thing I do all the time with a microprocessor - but I have never used an convertor. I even had a quick look for you at a couple of companies that might do one - but no joy.
I did find a USB convertor but I know nothing abaout it, link:-
www.jovasolutions.com/hardware/tims0100_overview.htm
Sorry, perhaps someone else can help,
Good luck,
Ali
|
|
|
|
|
|
|
Thanks Margret
|
|
|
|
|