Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [port-mapping]

Port-mapping refers to directly accessing the hardware registers (ports), in particular the input/output ports. Use this tag for discussing direct port access.

0
votes
1answer
45 views

Two ports on Uno with ethernet shield

I am making an Arduino mod-bus device and I want to make a webpage as well that will allow me to reset the unit if there is any issues remotely. To do this I would need the mod-bus to operate on port ...
0
votes
1answer
36 views

Why does attaching Nokia 5110 LCD make my otherwise fine MKR1000 disconnect USB after 15 secs?

This problem just started after 3 days of working on a project. I am using Arduino IDE in Windows 10. When I go to upload "Blink," everything works fine. I connect the USB (sometimes I have to ...
0
votes
1answer
38 views

Switch two or more digital outputs of ESP8266 at the same time [closed]

I'd like to control some digital ICs with a ESP8266-12. How can I switch 2 pins to HIGH in the same moment? How can I switch one to LOW and the other to HIGH in the same moment? Is it possible with ...
0
votes
0answers
33 views

Problem with DDR & PORT registers

I have a little problem. I just replaced pinMode function with a DDR register. After replace the buttons don't work properly. Old code works fine, but new doesn't. New code: // PINS TCCR1B = TCCR1B &...
0
votes
0answers
40 views

NodeMCU 1.0 (ESP 12 E Module) 2pcs ESP8266 Port Grayed Out

I recently got an ESP8266 NodeMCU board and installed the necessary drivers but the port is still grayed out in the arduino IDE.
0
votes
0answers
49 views

Arduino ESP8266 Board Port Greyed Out

I just got a NodeMCU ESP8266 board and when I try to use the IDE, the port is grayed out. Please Help. NodeMCU 1.0 (ESP 12 E Module) 2pcs ESP8266 WiFi Microcontroller with CP2102 Works Great with ...
0
votes
1answer
28 views

What is the best way to configure a bidirectional, open collector data pin? [closed]

I want to communicate with an old keyboard asynchronously through a single open collector, bidirectional data pin. As part of the protocol, the timing will be controlled entirely by pulse width. I've ...
1
vote
1answer
97 views

Arduino Nano /Uno USB is not getting recognized

I have multiple Unos and Nano and recently due to some bad configuration the USBs are not getting recognised on my Mac Air Laptop. These were working models for almost 1-2 years. I used it to control ...
0
votes
1answer
1k views

Send SMS Arduino Uno + SIM900A shield

I am working on a module to send messages. I write the message on the serial monitor + phone number and I have to send the message to the line. Question: How to send messages through the SIM900A ...
1
vote
2answers
3k views

Arduino Uno R3 to Wemos D1 R2 project migration - Pinout problems

So i've chosen to purchase a Wemos D1 R2 board in order that my old Arduino Uno R3 projects can get some new IoT features. However, even if my code is working in Uno perfectly, i want to test it using ...
1
vote
1answer
645 views

How to determine which pins_arduino.h file is used?

For some applications I need access to the registers that control the output/input and high/low state of pins. For example pin 10 on a adalogger is PORTB with a mask of _BV(6). This information can ...
-1
votes
1answer
282 views

MKR FOx 1200 doesn't upload Sketch

My Arduino MKR Fox 1200 doesn't upload any sketches. First it worked, but now it doesn't. It compiles the bare minimum sketch (empty loop and empty setup) but then uploads forever and after a long ...
0
votes
1answer
179 views

Arduino Uno - Multiple modules for HDMI switch device

I have an Arduino Uno device that uses the following modules: 16 PIN LED w/ Backlight RFID - RC522 (RFID Reader) HR911105A (LAN Module - HanRun) These three modules use every digital pin available ...
1
vote
0answers
66 views

No Socket Available message floods serial monitor

Serial Monitor get's flooded with "No Socket Available" message. This seems to occur even before I Try to communicate with my Hue bridge through my hub port. Does anyone see why this is occurring ...
1
vote
1answer
5k views

Arduino Mega 2560 interrupt pins and port mapping with rotary encoder

I am trying to use port manipulation in interrupts to read a rotary encoder. I found code for a Uno, so the port call for pins 2 and 3 are different. I think on the Mega they are PORTH3 and PORTH4 ...
0
votes
1answer
4k views

Using all ten capacitive touch inputs on the ESP32

I am using a Wemos Pro ESP32 development board and would like to be able to use all ten of the available capacitive touch inputs. I am able to get readings from nine of them but not T1. Here is the ...
0
votes
0answers
388 views

Python 3 and Arduino serial port issues

I've seen some posts about sending characters from python to arduino. However, my problem is very fundamental and that is that when I run one the other code says that it cant open the port since it is ...
0
votes
2answers
4k views

Problems with I2C connection on ESP8266 - 12F, which pins should I use?

Previously I had pined the temp/hum sensor HDC1080 with an Arduino using this sketch and everything worked fine. Now I want to run it over an ESP-12F, I uploaded it but it has issues at the time of ...
1
vote
1answer
356 views

Windows stops recognizing Arduinos

I've just got my first Arduino Pro Mini and a USB to TTL chip. When I try to upload the program I get the message The uploader process failed followed by avrdude: ser_open(): can't open device "\\.\...
1
vote
1answer
326 views

Port manipulation in Arduino using byte value

I'm trying to write PORTB and PORTD in ATmega328P using byte system like this, // PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0 // N N N N N U U U // 7 6 5 4 ...
0
votes
1answer
111 views

Arduino IDE compiling for non-arduino AVR boards

Using: Arduino IDE 1.8.2 the board manager from https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json an ATmega168P MCU in TQFP I was able to run my code successfully by modifying ...
0
votes
2answers
280 views

Where is PORTB defined?

On Arduino I can set digital pins by setting special variables PORTB and PORTD (or maybe they are not variables?). Where are those variables defined? I grepped /usr/share/arduino, but found nothing. ...
1
vote
2answers
81 views

Why does “!=LOW” != “HIGH”?

I'm learning about accessing ports directly on the ATMEGA 328 using an Arduino Uno. The program sets up pin 13 as an output and pin 2 as an input. I then enable the pull up resistor on pin 2. I read ...
4
votes
2answers
4k views

Equivalent for PORTB in Arduino Mega 2560

Like I said in the subject, I would like to know the equivalent for the instruction: PORTB |= 0x01; PORTB &= ~0x01; More precisely I was using it to trigger a fast pulse conversion on my shield-...
0
votes
1answer
390 views

Output specific value using port manipulation

How can I output a specific value on a pin using port manipulation? Example: I want to use this code but without any arduino functions, just with port manipulation: for (int i = 0; i < 255; i++){ ...
2
votes
1answer
941 views

while(1) loop blocks program to enter interrupt

I want to build a program in C that enables / disables a passive matrix display. But my problem occurs before I can even implement one function of this display. I have a simple switch connected to ...
3
votes
1answer
260 views

Port Manipulation and serial communication

i'm working on a laser timer using arduino and i saw that using direct port manipulation can have a really better time precision. My only concern is about serial communication, because i am using some ...
1
vote
2answers
150 views

How fast can I read Arduino port D?

I'm trying to see how fast I can read an Arduino IO port. It's being toggled with an random speed /white square wave and I want to see which is faster, the Arduino or the signal. The pin on port D ...
1
vote
1answer
681 views

ADC port manipulation

I was modifying this ADC Touch implementation, namely switching analogRead and pinMode to what I thought would be port manipulation equivalents. I get very different readings (better and more stable ...
1
vote
2answers
435 views

I2C on non I2C pins, possible?

I have 2 I2C devices that uses the same address. One of them is the DS3231 RTC. I use this library for the DS3231. I dont want to mess with the other one cause it is way more complicated then this one....
1
vote
1answer
120 views

While condition with & bitwise of PINx read

I was looking into ATmega32u4 datasheet to configure the SPI, and there is initialization snippet for data transmission. void SPI_MasterTransmit(char cData) { /* Start transmission */ SPDR = cData; /*...
1
vote
1answer
58 views

Performance tuning PORTB manipulation - mask

I have the following snippet that seems to be taking a total of 6 CPU cycles per invocation. Can I speed this up somehow? x is a byte with the 3 lowest bits set. #define SET_COLOR(x) PORTB = (PORTB ...
1
vote
1answer
81 views

Port D isn't Working as Input

I'm using an Atmega328p SMD with 32 pins. I'm trying to get several pins on Port D to function as inputs. As outputs, they work fine, but for some reason, not as inputs. Here's a simple example of ...
2
votes
3answers
3k views

Arduino Nano (clone) not recognized

Asking here cause I ran out of options in searching. My Arduino Nano clone isn't recognized by my computer anymore. It was, until I plugged into a Windows machine, that did not recognize it... and now ...
1
vote
1answer
524 views

Pin toggle speed

If I use direct port manipulation, what is the average number of clock cycles it takes to flip a pin on the arduino ie. void loop(){ PORTB |= 0b00010000; PORTB &= ~0b00010000; } So how ...
1
vote
1answer
229 views

Reserve /dev/ttyUSBx

I have multiple Arduinos that I want to control using Python. My problem is that when I plug my Arduinos into the computer, they get assigned the port /dev/ttyUSBx where x increments with each one I ...
1
vote
3answers
3k views

Arduino Nano not showing up in /dev

When I plug in my nanoatmega328 to my computer, nothing shows up in /dev as I expect it to. If I plug in my Uno, /dev/ttyACM0 shows up. I have tried several Nanos. Linux Mint 17.2.
1
vote
1answer
162 views

No sketches will upload to Arduino Uno board; says “access denied”

I'm using an Arduino Uno board with an HP computer running Windows 10 and IDE version 1.6.8. Arduino was working fine for me until a few days ago, when (and I suspect this is the root of the problem) ...
2
votes
2answers
2k views

How to update multiple outputs simultaneously

I need to update simultaneously all the outputs of a specific port. I am familiar with using micro-processors assembly language. After initializing a port (Data Direction Register), I can write to ...
1
vote
2answers
1k views

Is RX1 and TX0 the same thing as TX and RX? Will there be a difference in the way I program it?

I have an Arduino. I'm not sure if RX1 and TX0 the same thing as TX and RX? Will there be a difference in the way I program it? For example, do I treat RX1 and TX0 as RX and TX in the Arduino IDE ...
4
votes
1answer
148 views

What does it mean when there are two addresses listed in the data sheet for a particular register?

I have been trying to grasp a better understand of registers and port manipulation. I have been looking through the ATmega 328P datasheet to look at the different registers. For some of the ...
0
votes
1answer
57 views

driver is not showing up in Port assignments mac

arduino nano, the driver is not showing up in Port assignments. It has worked with this operating system before. I’ve messed something up. “OS X EI Capitan ver. 10.11.3 I have check the posts but the ...
0
votes
1answer
368 views

Converting TinkerKit to native Arduino pins

Over the years, I have acquired many TinkerKit modules for my Arduino Uno. My only issue is that I need to find a way to code using the native syntax, and not the less-powerful TinkerKit variation. To ...
2
votes
1answer
833 views

Mac Arduino IDE Connection to Min Seg (Mega 2560). No tty

I own a Macbook running OS X 10.10.3 (Yosemite) I own a Min Seg. My Min Seg model is built on an Arduino Mega 2560. Problem When I connect the board to the Macbook, using either of the Macbook's ...
0
votes
1answer
260 views

Arduino W5100 AVR

I'm trying to use a W5100 Arduino Ethernet Shield on a ATMega2560 using avr code. There exists a library written in C, which should work http://www.seanet.com/~karllunt/w5100_webserv.zip from http://...
1
vote
2answers
151 views

Arduino port recognition

New Arduino Uno, Arduino 1.6.3, MBP running 10.10.5. The Arduino IDE is running, I connect to the laptop via usb. The green LED is on the amber light is on but it's not blinking. I attempted to ...
1
vote
2answers
3k views

Enabling pins of Arduino Due with direct port manipulation

I want to enable pin 13 on my SAM3X8E using direct port manipulation. On this chip the pin is bit 27 in port B, so I used PIOB->PIO_PER = 1<<27; to enable this pin, but it doesn't work. This ...
9
votes
3answers
12k views

SAM3X8E (Arduino Due) Pin IO registers

How do the IO registers of Arduino Due work? On Arduino Uno just set DDRx, then PINx to read, PORTx to write, I'd like to do the same thing with an Arduino Due, but it has many more registers, such as ...