mlparadiso540 / same70_example_project

Simple project for Atmel SAME70 XPLAINED microcontroller. IO's on the board are monitored and controlled via a GUI client using UDP communication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

same70_example_project

This repository contains two projects:
SAME70_EXAMPLE:
This is the code that runs on the Atmel SAME70 Xplained board. It was created in Atmel Studio and is written in C
SAME70_CLIENT:
This is a GUI used to monitor and control the state of IO's on the SAME70 Xplained board. It was created in Microsoft Visual Studio and is written in C# using the Windows Presentation Foundation (WPF) framework.

What you will need:

  • PC
  • Atmel Studio
  • Microsoft Visual Studio
  • Atmel SAME70 XPLAINED board
  • ethernet cable
  • Atmel programmer (may or may not need, see "Getting Started" step 3)

Getting Started:

  • Download the code in this repository, then open and build each project in it's respective IDE
  • Connect SAME70 XPLAINED board to your PC via USB. There are two USB ports on the SAME70 XPLAINED board, connect the one labelled "DEBUG USB"
  • In Atmel Studio, push the code to SAME70 XPLAINED board by pushing the green "play" button at the top of the screen. If you are prompted to select a programming tool, select EDBG (Embedded Debugger).
    note: Atmel Studio and/or Atmel drivers do not always work correctly. If EDBG is not available, you may need to purchase an external Atmel programmer. The programmer used for this project was the Atmel SAM-ICE J-Link by Segger (www.segger.com)
  • Connect the SAME70 XPLAINED board to your PC with the ethernet cable
  • Run the SAME70_CLIENT

Controlling the SAME70 XPLAINED:
This project configures the SAME70 XPLAINED to have 8 outputs and 8 inputs
IO D0-D7 are configured as outputs, shown below
image outputs

IO D14-D19 and D52-D53 are configured as inputs, shown below
image inputs

D14-D17 are configured as pull-downs. They are grounded in their normal state and trigger when power is applied
D18-D19 and D52-D53 are configured as pull-ups. They are 3.3v in their normal state and trigger when ground is applied

When the SAME70 CLIENT is run, the following screen is displayed
image client

Clicking a Toggle button will switch the respective IO on/off. The circle indicator above each button will turn green when the respective IO is outputting 3.3v, and will turn gray when outputting 0v. The circle indicator under each input will turn green when the respective input is triggered. For D14-D17 (pull-down inputs), they will turn green when 3.3v is applied. For D18-D19 and D52-D53 (pull-up inputs), they will turn green when ground is applied.
In the screenshot below:
-D0 is outputting 3.3v
-D14 has 3.3v applied
-D53 is grounded
-All other IO's are in their normal state


image on

Troubleshooting
Problem: The SAME70 CLIENT is not communicating with the SAME70 XPLAINED
Solution: Trying pinging the SAME70 XPLAINED. Open the command prompt and type "ping 192.168.0.100". If there is no response, you will need to configure your ethernet port

  • Click the Windows start menu and type "Ethernet" and open Ethernet Settings
  • Click "Change Adapter Options"
  • Right-click the ethernet port that the SAME70 XPLAINED is connected to, then select "Properties"
  • Select "Internet Protocol Version 4 (TCP/IPv4)" in the menu, then click the Properties button
  • Select "Use the following IP address" and enter the following:
    • IP Address: 192.168.0.99
    • Subnet Mask: 255.255.255.0
    • Default Gateway: 192.168.0.1
  • Click the OK button to apply changes
  • You should now be able to successfully ping the device. You may need to restart the command prompt

Problem: I can ping the SAME70 XPLAINED and can see network traffic on Wireshark, but SAME70 CLIENT is still not communicating
Solution: Your firewall is probably blocking the SAME70 CLIENT. You will need to allow it

  • Click the Windows start menu and type "firewall", and open Windows Defender Firewall with Advanced Security
  • Select Inbound Rules in the left pane
  • Find "same70_client.exe" in the list, there will be 4 rules. Double-click each one, make sure "Allow the connection" is selected, and click Apply
  • The SAME70 CLIENT and SAME70 XPLAINED should now be communicating. You may need to reset the client

About

Simple project for Atmel SAME70 XPLAINED microcontroller. IO's on the board are monitored and controlled via a GUI client using UDP communication


Languages

Language:C 92.6%Language:Makefile 4.7%Language:C++ 1.9%Language:C# 0.7%Language:Objective-C 0.1%