Notifications
Clear all

Using a pin to signal another pin

68 Posts
7 Users
0 Likes
3,934 Views
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 

@zander 

Yes but now you're dealing with a 16Meg processor and <32K storage 🙂

Govern yourself accordingly 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@will Back in the day it was a 5meg processor and CISC at that. But I had 6 to play with.

Unless I hear from someone today with a 'magic' call, I will restructure the code to be loopy as much as that galls me.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 

@zander 

Or a Data General or PDP with 64K memory and you had to huddle groups of subroutines together so they could be slipped into the top half of the 64K because you couldn't have any more than 68K of code all at the same time.

Why did we call them the "good old days" ? My first Comodore PET had 8K RAM and 8K ROM.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@will The first IBM 'mainframe' I was trained on had 1,401 bytes in the base model. I never saw one in the field, most people ordered them with 4k, 8k, 16k. AND we ran all the financial systems then just like today.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 
Posted by: @zander

@will The first IBM 'mainframe' I was trained on had 1,401 bytes in the base model.

How odd, I always thought memory came in even numbers of bytes.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@will For sure. I can't tell you for sure, I am challenged to remember breakfast today, but my hunch is that was what was left over after the OS was loaded (from a card deck) OR since fixed memory locations were used for reader, punch and printer and the printer was IIRC 133 chars, that gives you the odd number. It's one of those explanations, probably the last one.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1695
 

Hi Ron @zander,

   I think @will is doing (as usual) an excellent job on answering your queries ... I haven't looked at the Arduno cloud, but clearly it is about providing an 'easy' interface for the user, and probably a 'low maintenance and minimal workload/cost' for the cloud programmers ... it may not be that efficient at the server processor, because that is unlikely to be a major issue. The days of counting processor cycles may not be completely extinct, but it is certainly confined to a very few special cases - generally the cost of programmer hours dominates the approach.

I appreciate 'I am genetically pre-disposed to not use cpu cycles endlessly looping', but with a microprocessor/microcontroller it also depends on whether it has something better to do. In many cases, it may be waiting for something to happen before it has any other tasks to do, so why worry?

Of course, if it is in a multitasking environment, the situation may be different, which is where an RTOS often appears ... and even if it has only a single task, then care may be needed to perform it as quickly and efficiently as possible .. you only use the car brakes sporadically, but you want them to respond rapidly when you press the pedal.

Also, in the single task situation, power efficiency may be important (battery life, powe dissipation, etc.), so it may be necessary to snooze or sleep the processor when it is waiting ... but that is another story....

Hope this helps trigger a few thoughts.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@davee All good Dave. I am about ready to give up on finding what I was hoping for and will re-structure the code into a conventional loop. If I was younger I might be tempted to switch to the ESP32 API and go full multi-tasking but I am not getting any younger so will mark this as solved very soon.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 

@zander 

Think of the loop function as a snoopy interruption handle which rudely interrogates the system state instead of calmly waiting for a call for help.

And, if it helps at all, just remember that it's using 100% recycled electrons 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@will It's ok, I will just put all the procedural code (what there is of it) in subroutines and the loop will be nothing but control. 

Recycled? Is that why the arduino box is sort of green? But I am using an ESP, will that be more damaging to the environment?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 
Posted by: @zander

@will It's ok, I will just put all the procedural code (what there is of it) in subroutines and the loop will be nothing but control. 

That's the normal procedure.

Recycled? Is that why the arduino box is sort of green?

Maybe because it wasn't quite ripe 🙂

But I am using an ESP, will that be more damaging to the environment?

Same recycled electrons, you can even use the same USB cable for both 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@will Sharing is caring, but still need to wipe down with an antiseptic wipe.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2535
 

@zander 

You're better off using mustard or green relish.

Be safe, always use a condiment !

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

@will I yield to the master.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7010
Topic starter  

As a result of a lot of good discussion yesterday, I revisited my design and the code ended up a lot simpler so now a loopy approach doesn't bother me so much.

Just catching up on some recommended YT vids to watch and I found a really good Ralph S Bacon video on how to get a Red and Green LED on a single GPIO pin. There was a LOT of new to me information in that video, once again teaching me about more capabilities of solid state devices I had no idea about. If you are not an expert on how MOSFETS can be used, have a look at this video. This will further change my design and I am hoping it will be even more simple. It certainly will match up to the arduino cloud better.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Page 2 / 5