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 : port command speed
Author | Message | ||||
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 554 |
iam curiosity about the delay between the pins bits if i use the port command . no digital analyzer atm so i ask here . the user manual say :Set a number of I/O pins (i.e. with one command) but how simultaneously is it ? Edited 2023-07-31 09:30 by Plasmamac Plasma |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
I think PORT bits are now effectively written and read as a single word, so it is actually simultaneously. If there is any delay at all it's probably not measurable. I say this because this isn't a simple IO port based on a flip-flop register on the data bus. Things don't work like that any more. :) It may be that the individual pin registers are controlled one after the other then the whole register is copied to the pads. The end result is the same. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Plasma, Less than 4ns (0.000000004 seconds) delay measured between individual pins changing. For MMBasic you can assume they change simultaneous. That is why Mick suggested to use the PORT command to drive stepper motors. They change all at the same time. Volhout Edited 2023-07-31 17:03 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1101 |
Using this code on a Picomite running the latest software - Setpin gp7,dout Setpin gp13,dout do port (gp7,1,gp13,1) = 1 port (gp7,1,gp13,1) = 0 loop On the oscilloscope, there is no measurable difference (less than 1nS on a 100MHz scope) on the positive transition with up to 30nS of ripple on the high state. The negative transition has up to 20uS jitter. The switching frequency in this example is around 14MHz. D. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 554 |
Thx for the test. Plasma |
||||
Print this page |