Need atmel studio To take data from pc.

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

Hi there,

I am programming a atmel ATMEGA644A, he is connected to à pcf2127 (RTC) on a board.

I use atmelstudio6 to send my C programms to the microcontrollers.

I am at the end of my project, this card is suppose to control LED eclairement through day.

All I need is that atmel studio get time from computer with time.h library (localtime fonction) and send it to the microcontroller to set my rtc's date and hours.

He must send it through my USB to JTAG connexion.

Can i do a C programm who run permanently, and store the clock time in a file that atmel can reach ? Does atmel do such things ? Like real time programming juste before sending my clock data ?

Thank you for your response. I am a bit lost in that pc/microcontrollers link.

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

Cocotte98 wrote:
Does atmel do such things ?
Maybe though not via JTAG (it's via UART)

Does Atmel Studio 6 have the Data Visualizer extension?

There's a DGI message to the MCU and a virtual COM is created; your preferred computer language on Windows to send the time to the MCU via COM.

Dashboard Configuration Example | Data Visualizer User's Guide

[mid-page]

The CDC interface will appear on the host computer as an ordinary serial COM port.

MSG_RES_DATA | Data Visualizer User's Guide

 

edit : UART is available only on Power Debugger.

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Oct 24, 2019 - 08:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Studio and time.h are not going to help much. If the micro needs "realtime" it needs a communications channel from the micro to the PC and then it needs some kind of server/daemon process running on the PC that will fetch the time and feed it across the comms link.

 

There are various ways you could do this - one would be to use some kind of tcp/ip link from the AVR, it could then connect direct to an NTP server.

 

Another way would be a simple USB or UART link from AVR to PC but then the PC is going to need some kind of relay to fetch time (could be local PC time?) and then feed it across that link.