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.

Filter by
Sorted by
Tagged with
2
votes
1answer
2k 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 ...
2
votes
1answer
445 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
661 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
1k 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
763 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....
2
votes
1answer
356 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 = ...
1
vote
1answer
73 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
107 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 ...
1
vote
5answers
6k 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
1k 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
305 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
7k 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
270 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
4k 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 ...
2
votes
2answers
4k 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 ...
3
votes
1answer
174 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
96 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
478 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
1k 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
347 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
178 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 ...
2
votes
2answers
4k 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
18k 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 ...

1
2