Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:55 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM Basic & UBW32

Author Message
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 06:41pm 21 Jan 2014
Copy link to clipboard 
Print this post

Hi All

Is the one and only usb port on the ubw32 accesable from within a MMBasic program
to receive or send commands to a PC ?

I want to connect a UBW32 permanently to an industrial cpu board with XPe on it.
Then by writing a program for the UBW with MMBasic the commands from the cpu
would change PWM or Freq outputs.

Just using the standard UBW32 hex file I can set inputs and outputs, but nothing more.
Regards
Hervey Bay Qld.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 07:18pm 21 Jan 2014
Copy link to clipboard 
Print this post

The USB port acts like standard console input/output.
As long as your PC application is able to handle error messages etc, there is no problem.
Whenever your PC application opens the serial port, it will get the Maximite opening message. If that's a problem, you could send your data via one of the serial ports and a USB to TTL adaptor.

I have had a Maximite hanging of a PC gathering all sorts of data ever since MM Basic V2.6 or 2.7
For my own application, I use a checksum but data errors are rare and usually caused by Windows doing something to upset the USB port.

UBW32's are a good reliable choice for your application.

Jim
VK7JH
MMedit   MMBasic Help
 
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 10:54pm 21 Jan 2014
Copy link to clipboard 
Print this post

Hi All

Thanks for the reply Jim.
I can simply keep dumping the input to garbage until no further input, then
when sending a command, the response should make sense.

Am I to assume that opening as console is the same as Random ? (Input & Output)
In other words I can read the buffer in the UBW32 and write the response to the port
using Print or Write ?

Regards

Regards
Hervey Bay Qld.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6101
Posted: 11:19pm 21 Jan 2014
Copy link to clipboard 
Print this post

  Dinosaur said  

Am I to assume that opening as console is the same as Random ? (Input & Output)
In other words I can read the buffer in the UBW32 and write the response to the port
using Print or Write ?

Regards

Yes.
The actual commands will depend on the programming language you are using.
When you are using the Maximite USB serial port, the speed is irrelevant.
With the MicroMite, you use a USB to serial adapter and then the speed used is relevant.

Jim

VK7JH
MMedit   MMBasic Help
 
Dinosaur

Guru

Joined: 12/08/2011
Location: Australia
Posts: 311
Posted: 12:50am 22 Jan 2014
Copy link to clipboard 
Print this post

Hi All

Thanks for your prompt replies Jim.
Regards
Hervey Bay Qld.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024