Questions about the PORT

Does the PORT flashing in repeating loop? I am asking because I do not want that a LED lamp flashing during the loop

Can PORT be used to connect many arduino cards in same PORT register? I am asking because I want some arduino cards share the same function on the main arduino card.

No actual information provided, no answer.

I want to programming a code that uses LED diode to light but I do not want this to flashing during the loop because I thinking that while next instruction, it will flashing diode because it moved to a new instruction in the CPU so the LED diode shut down until it comes again in the loop.

About the PORT share with some arduino card that to receive the same shared function to processing with its own task in individual board. For example, PORT sends the necessary information; therefore two arduinos calculate the same function but its own path. Such example: some small Lilypad Arduino which each provide fourteen digital pins that can be connected to three pieces of stepper motor which each has just 4 pins; so, two pins left for input and one optional I/O to another arduino device.

For me, it is easier to remember code if I split it into elements.

Well, I am fascinated!

164 posts so far, much discussion about MEGA 2560s and other matters, and you do not appear to understand how a microcontroller works. :astonished:

An output "port" is in fact a latch, based on a flip-flop which maintains the state to which it is written by the corresponding "write" instruction. It will generally be cleared - set to zero - by the reset process of the microcontroller and in many or most microcontrollers, the port may be defined to be either an input or an output.

This is in contrast to the general notion of a microprocessor which offers not a latch, but a data bus, address and control signals which can transiently execute commands to send data to external hardware with the intention of that particular external hardware latching the data and acting on it.

Communication between different processors is a quite complex matter, generally executed by some protocol such as asynchronous serial transfer (using a UART) or a clocked serial protocol (thus requiring two lines) such as I2C or USB.

So it is generally a very inefficient way of sharing processing tasks (unless special hardware is built into the processors) because such communication becomes as complex and time-intensive as the other tasks themselves which are intended to be so delegated.

Paul__B:
Well, I am fascinated!

164 posts so far, much discussion about MEGA 2560s and other matters, and you do not appear to understand how a microcontroller works. :astonished:

An output “port” is in fact a latch, based on a flip-flop which maintains the state to which it is written by the corresponding “write” instruction. It will generally be cleared - set to zero - by the reset process of the microcontroller and in many or most microcontrollers, the port may be defined to be either an input or an output.

This is in contrast to the general notion of a microprocessor which offers not a latch, but a data bus, address and control signals which can transiently execute commands to send data to external hardware with the intention of that particular external hardware latching the data and acting on it.

Communication between different processors is a quite complex matter, generally executed by some protocol such as asynchronous serial transfer (using a UART) or a clocked serial protocol (thus requiring two lines) such as I2C or USB.

So it is generally a very inefficient way of sharing processing tasks (unless special hardware is built into the processors) because such communication becomes as complex and time-intensive as the other tasks themselves which are intended to be so delegated.

I found out what latch is; now it is clearly. Now I see that I chosed the microcontroller than a processor 8)
I know that communication between different processors is complex but I am trying my best.

So you mean actually I should have one Arduino DUE which I already have stored in one of three boxes below the bed.
Else a microcontroller with a lot of pins?

Well, the alternative to a microcontroller with a lot of pins (I do not know much about the DUE) is to use a number of external latches such as the 74HC595 or if you need more current handling capacity, the TPIC6B595.

These are in fact serial 8-bit shift registers (with latches) which can be chained one to another and the information clocked into all of them using only three port pins. If speed is not a critical matter, this is a very good approach and particularly useful if you need to control groups of things - such as LEDs - at a modest distance (a foot or so) from each other.

Paul__B: Well, the alternative to a microcontroller with a lot of pins (I do not know much about the DUE) is to use a number of external latches such as the 74HC595 or if you need more current handling capacity, the TPIC6B595.

These are in fact serial 8-bit shift registers (with latches) which can be chained one to another and the information clocked into all of them using only three port pins. If speed is not a critical matter, this is a very good approach and particularly useful if you need to control groups of things - such as LEDs - at a modest distance (a foot or so) from each other.

Now I have been checked what those 74HC595 and TPIC6B595 are; so, in practical, a 8-bit can connect to 256 LEDs to control them ? I see that it exists 32-bit shift registers which is suitable for me to control eight stepper motor for each 32-bit shift register.

Qwseyvnd: Now I have been checked what those 74HC595 and TPIC6B595 are; so, in practical, a 8-bit can connect to 256 LEDs to control them?

I don't know about the "8-bit", but a chain of 32 shift registers controlled by three port pins could control 256 LEDs, on or off, though you might need to buffer the common latch and clock lines.

Qwseyvnd: I see that it exists 32-bit shift registers which is suitable for me to control eight stepper motor for each 32-bit shift register.

I realise there are 16-bit latches, I hadn't looked at 32-bit latches. The 8-bit latches are more readily available and probably the cheapest per function.