Atxmega256a3bu JTAG pin and GPIO?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All

 

I am using the Atxmega256a3bu

 

I need about 4 additional GPIO pins for a DIL switch for various setting option. The only GPIO available are the JTAG pins. I am aware that during programing these pins should not be shorted to GND, but is there anything else i need to keep in mind when using these pins as GPIOs?

 

 

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not really, just disable JTAG and be aware of any alternate uses for those pins, just as with any other i/o port pins.

Also be sure your switches are open before enabling them as JTAG again.

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Jim

 

Great.

 

I presuming disabling has to be done in my firmware? I guess this the switches would need to be ignored when running in debug mode?

 

What would be an alternative use, they seem to be GPIO or ADC?

Thanks

Regards

DJ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, the data sheet should detail how to dis/enable JTAG, or it may be disabled using ISP.

Use some conditional coding so if you define DEBUG when compiling, then your port init ignores those pins, and any use of the dip switches read function returns a default value.

The data sheet describes any alternate use for all port pins.

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"