-
Notifications
You must be signed in to change notification settings - Fork 293
TinyGv9j Manual Programming and Test Instructions
##Setup The assembled board should be set up with the following:
- Atmel-ICE programmer
- Four stepper motors
- USB connected to host computer
- Bench power supply - set to 24volts, current limit about 1.5 amps
OBSERVE POLARITY WHEN CONNECTING TO BOARD
The Atmel-ICE should be plugged into the SAM port
The JTAG (SWD) connector needs to be properly seated. It's all too easy to plug this connector into only one row of pins.
The motor connectors should plug in as shown. The 5th pin (grounding pin) is left unconnected. The ground pin is marked by white silkscreen on the board.
The blue power light should light when the power supply is turned on.
##Programming If you have not already done so bring up the host computer and related programs
- Boot the mac (which is what we are using in this example. You know the password)
- Start the Windows 7 virtual machine (virtual machine labeled as
W7 WORKING CURRENT
)
Start Atmel Studio 6.2. The file name is TInyG2.atsln. AS6 can be started either from the project directory or from the ladybug on the desktop. Atmel studio 6.2 can take a loooong time to start up. 2-3 minutes on some machines.
Select /Tools/Device Programming
- Under TOOL select the Atmel ICE. See the second picture if you don't see the Atmel-ICE as an option
- Under DEVICE select ATSAM3X8C from the long list of Atmel products
- Under INTERFACE select SWD programming mode
- Hit APPLY
If the Atmel-ICE is not an option it's either because it's (1) not plugged in, or (2) not connected to the virtual machine. Use the above dialog to connect it. Then go back to the TOOL / DEVICE / INTERFACE step, above.
READ the Device. The board must be powered up. It should return a device signature and read about 3.3v
Hit the MEMORIES tab to get the programming dialog
Program the chip.
- First you must select the tinyg2.elf file you wish to program onto the chip. This is usually in the project directory in which you found the TinyG2.atsln file. The file select is stick so it will stay selected if you are doing more than one board.
- Then hit PROGRAM
Programming and verification takes about 20-30 seconds.
When done verify programming is OK - the red TX LED on the board should cycle at about 1 Hz.
Set the boot fuse. Select GPNVM Bits. Select boot from Flash, Bank 0
I don't have a picture for this yet and I'm going from memory, so I may not have this exactly right. You do not want the chip to boot from ROM, and you want bank 0, not 1.
Close the programming dialog box. This is necessary to release the USB port so it can be connected to Coolterm.
Verify programming is OK - the red TX LED should cycle at about 1 Hz.
##Test the Motors Gentlemen, start your Coolterm.
Select the Options menu and Re-Scan Serial Ports. You should see a port labeled usbmodem001. Select it. Don't worry about baud rates or other settings. These are handled natively by USB, which should connect at 12 Mbps.
If you see something like usbmodemfa12121 then try the following:
- Power cycle the board and rescan. Please note this condition in testing notes for this board.
- If that doesn't work check the GPNVM bits to make sure it's booting from Flash, Bank 0.
Select the Transmit window. It's convenient to set to LINE mode and CR
Connect to the board.
Confirm startup string. You should see something like this in the terminal window
Enter The following Gcode sequence and look for proper motor movement.
G0 X20 Y20 Z20 A20 X0 Y0 Z0 A0 G1 F200 X4 Y4 Z4 A4 X0 Y0 Z0 A0
The final move must be terminated with a carriage return or it won't run.
You can use the Coolterm Send String command under the Connection menu to run this command multiple times or for subsequent boards. (On the mac the Connection menu item is at the top of the screen, not on the Coolterm window itself)
The string you type into the dialog box will remain available for the next board if you move the send-string window so you can get at it later, and then just click on the window when you need it again.
The instructions above were for the first board. Here's what's different for subsequent boards.
###Programming the Next Board
- You should be able to just re-open the Studio6 programming dialog. Most values will be the same, but you still have to APPLY the programmer, READ the chip, select MEMORIES, PROGRAM the chip, and then exit.
###Testing the Next Board
- The previous board is probably still connected - at least in Coolterm's mind. You will need to hit the DISCONNECT button and CONNECT again to establish connection with the new board. You can probably skip the whole OPTIONS dialog as the next board will also come up as usbmodem001. If the board does not connect go back to the options dialog, rescan, and look for the new board in the USB choices.
Getting Started Pages
- Home
- What is TinyG?
- Getting Started
- Connecting TinyG
- Configuring TinyG
- Sending Gcode Files
- Flashing TinyG
- Chilipeppr
Reference Pages
- TinyG Help Page
- TinyG Tuning
- TinyG Command Line
- TinyG JSON
- Gcode Support
- Homing and Limits
- Inch and MM Units
- Alarms and Exceptions
- Coordinate Systems
- Status Codes
- Status Reports
- Power Management
- Feedhold and Resume
- Licensing
- TinyG v8 Data Sheet
Discussion Topics
- Test-Drive-TinyG
- Jerk Controlled Motion
- Gcode Parsing
- Shapeoko Setup
- OX CNC TinyG Guide
- Creating Gcode Files
- Milling With Noisy Spindles
- Stepper Motors and Power Supplies
- Text Wrappers and Transaction IDs
- Using External Drivers
- TinyG Projects
Chilipeppr
- Chilipeppr
- Chilipeppr Advanced Usage
- Chilipeppr Archive and Restore Parameters
- ChiliPeppr PCB Auto Level
- Automatic Z Homing When Milling PCBs
Troubleshooting
Developer Pages