Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arduino DUE direct port I/O operations (Read 4702 times)
Max Compana
Newbies
*
Offline


Posts: 2
Joined: May 29th, 2015
Arduino DUE direct port I/O operations
May 29th, 2015 at 1:27pm
Print Post  
I have Atmel Studio and Visual Micro working perfectly together. 
Could anybody help me set up the system so that I can manipulate I/O ports directly?
When I'm trying to do something like that, I'm getting an error of the type "PORTD in not declared in this scope"

PORTD &= B11110111;

for(i=0;i<N;i++){
   PORTD |= B1000;
   PORTD &= B11110111;
}  

I just discovered that digitalWrite() instruction for Arduino takes 2.5 us. This is way too long for my application - I'm making a waveform generator, and resolution is very important. So this is the reason why I want to work with IO ports directly. 
Please advise. 
Thanks,
Alan
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino DUE direct port I/O operations
Reply #1 - May 29th, 2015 at 1:34pm
Print Post  
Hi Max,

Normally you can ask these sorts of questions on the Arduino.cc forum because Visual Micro is compatible with the Arduino Ide. You will probably get better answers on arduino.cc Smiley

Which board are you using?

Thanks
  
Back to top
IP Logged
 
Max Compana
Newbies
*
Offline


Posts: 2
Joined: May 29th, 2015
Re: Arduino DUE direct port I/O operations
Reply #2 - May 29th, 2015 at 1:50pm
Print Post  
I'm using Arduino DUE. It is ATSAM3X8E micro.
I think that it is somehow related to the libraries. This is why I decided to post my question here. Who would know better than Visual Micro how to set up the system?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino DUE direct port I/O operations
Reply #3 - May 29th, 2015 at 1:55pm
Print Post  
Actually I missed the subject which says DUE

I can't see how it relates to libraries as this is a part of the arduino core.

As I said the best place to look is arduino.cc

I found this at the top of google. It explains the DUE does not have a PORTD

http://forum.arduino.cc/index.php?topic=175617.0

Smiley

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint