Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:19 13 Jun 2025 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 : Addressable PicoMites

     Page 2 of 2    
Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1285
Posted: 01:33pm 17 May 2025
Copy link to clipboard 
Print this post

  dddns said  this maybe?
Another possible way


Heck, what is wrong with me  

All of my existing UART comm's are Full Duplex, differential transceivers and they have, wait for it.....ENABLES  


This is all I need to do (I think) and then get creative with how to make the node-of-interest, active:





 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 452
Posted: 02:05pm 17 May 2025
Copy link to clipboard 
Print this post

Looks promising, happy tinkering :)
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2163
Posted: 10:41am 18 May 2025
Copy link to clipboard 
Print this post

I think you don't need to worry about the enables.

If you have everything active and just establish some ground rules (a protocol) then everything will live nicely. yours is a wired version of a wireless network.

I did a star on several installations of a snooker table manager using scores of HC-12 433MHz modules hidden in the ceiling roses of the lights over the tables (and a few other exotics). Each had an address and only the master could initiate conversation (to prevent collisions) and the protocol kept everything tidy. In the production kit, I took this a  stage further with multi-channel wireless on some devices to act as proxies and cover blind-spots. That got complex but it worked - would recommend "flatness" of your network   Each slave ran identical software which was really nice, configured at install time and saved in Flash. Incidentally, this was the point I moved into the abyss because versions of MMBasic after 5.0408 erase the flash when you load your prog... I just couldn't do the re-config on 200 modules just because I uploaded new software... but 5.0408 is rock solid so I am not complaining.

write-up here  with working code. And here  is a vid of two micromites, and a MMX all talking to some VB on my laptop (the master) actually doing it with that protocol

No reason the same thing wouldn't work on wired multi-drop - the transmission medium is irrelevant if you consider the protocol only wants the data to move reliably. In my SIL module, I have made provision for multi-drop with a single diod and it work with a similar protocol really well over small distances (few metres - it's only 3.3V). The key really is having a layer of your software over the comms port, then you can do it on the cheap if you don't want to use hardware modules

h
Edited 2025-05-18 21:08 by CaptainBoing
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1285
Posted: 01:00pm 18 May 2025
Copy link to clipboard 
Print this post

  CaptainBoing said  I think you don't need to worry about the enables.


This is a bit different, bud.

Yes, my standard 4-wire multidrop works as you described although I do use the TX enables on the slaves whereas the master has RX & TX permanently enabled.

But what I'm looking at here is a way to have one console connection talk to multiple slaves, albeit one at a time. If I need to edit the code, etc. on a particular node, I want one connection but be able to talk to the selected node. All other nodes (PicoMites) need to be totally isolated from both TX & RX.

 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7746
Posted: 01:05pm 18 May 2025
Copy link to clipboard 
Print this post

But he won't listen to me 'cos I'm too ancient. ;)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1285
Posted: 02:56pm 18 May 2025
Copy link to clipboard 
Print this post

  Mixtel90 said  But he won't listen to me 'cos I'm too ancient. ;)


Au contraire  

It was your suggestion that reminded me of the enables which are effectively the same thing. Obviously, you weren't to know about my transceivers.

No, the thread was useful. Relays and UTFN  
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4982
Posted: 07:47am 19 May 2025
Copy link to clipboard 
Print this post

Phenix,

They call that MODBUS (RTU / ASCII).
You do not have to use RS485 hardware interface. Your RS232 multidrop will also work (short distance). MODBUS is designed to be addressable and robust (CRC).

I have already writen a MODBUS RTU master. And a MODBUS spy, it would not be too hard to also make a MODBUS slave running on a Pico, since all the blocks already exist in the master.

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1285
Posted: 08:03am 19 May 2025
Copy link to clipboard 
Print this post

  Volhout said  Phenix,

They call that MODBUS (RTU / ASCII).
You do not have to use RS485 hardware interface. Your RS232 multidrop will also work (short distance). MODBUS is designed to be addressable and robust (CRC).

I have already writen a MODBUS RTU master. And a MODBUS spy, it would not be too hard to also make a MODBUS slave running on a Pico, since all the blocks already exist in the master.

Volhout


Hi Harm,

You missed it  

This is about using one console/terminal connection for a string of PicoMites. Need to select/isolate the devices.

My main control network is separate. I have chosen Network Modular Control (NMC) for the control network, due to better efficiency:

  Quote  The command packets have the following structure:
Header byte (always 0xAA)
Module Address byte (0 - 255)
Command byte
Additional Data bytes (0 - 15 bytes)
Checksum byte (8-bit sum of the Module Address byte through the last additional data byte)
The Header byte is used to signal the beginning of a command packet. When waiting for a new
command, each module will ignore any incoming data until it sees a Header byte.
The Module Address byte is the address of the target module. The address can be an individual
address, or the group address for the module.
The Command byte is broken up into an upper nibble (4 bits) and lower nibble (4 bits). The lower
nibble contains the command value (0 - 15), and the upper nibble contains the number of additional
data bytes required for that command (0 - 15). It is up to the host to insure that the upper nibble
matches the number of additional data bytes actually sent.
The Additional Data bytes contain the specific data which may be required for a particular command.
Many commands have a “control” or “mode” byte in addition to other parameters required for the
command. Some commands require no additional data. It is up to the host to make sure that the
proper number of additional data bytes is sent for a particular command, and that the upper nibble of
the command byte is equal to this number.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4982
Posted: 09:08am 19 May 2025
Copy link to clipboard 
Print this post

OK, thanks.

Just to throw an idea. Although the Checksum byte is actually the sum of all bytes in the message, and it is simple to calculate, it may be faster to use a CRC8 in MMBasic.
Calculating the CRC is 1 instruction. Not a loop....

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1285
Posted: 10:10am 19 May 2025
Copy link to clipboard 
Print this post

  Volhout said  OK, thanks.

Just to throw an idea. Although the Checksum byte is actually the sum of all bytes in the message, and it is simple to calculate, it may be faster to use a CRC8 in MMBasic.
Calculating the CRC is 1 instruction. Not a loop....

Volhout


Great idea, I'll test it. It's really awesome how we have these built-in features  

I want to test the ModBus system to be compatible with existing hardware. I just recently adapted a VFD/Flux-Vector drive to a Bridgeport milling machine. This is amazing value-for-money and boosted the performance of the mill.
It is ModBus compatible (I am driving via DIO, though) and so I was planning to experiment with it. Unfortunately, as soon as I started and tested the machine, the production guys became excited and now it's busy full-time.

I will purchase another of these devices. In fact, for <£50 (2.2KW), I might install one on every one of our machines.
 
     Page 2 of 2    
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025