Program to control Microcontroller.

Discussion in 'Electronics Resources' started by samjesse, May 4, 2014.

  1. samjesse

    Thread Starter Active Member

    Sep 14, 2008
    202
    0
    Hi

    Could some one please recommend a program that allows the user to send commands from a PC to the microcontroller, either to control devices (lights, motors, etc.) or to read data from devices.

    Many thx
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    At the PC end you could use RS232 such as Hex Com Rs232, or use something like Modbus protocol, but either way you would need to decode this at the microcontroller end.
    Modbus is a common industry standard for controlling remote I/O etc sending packets of information from Master to Slave.
    Max.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,357
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    You can also use Modbus through the USB port.
    Max.
     
  5. samjesse

    Thread Starter Active Member

    Sep 14, 2008
    202
    0
    What is a good user friendly MOdbus tool that is not too expensive that I should got?

    Thank you
     
  6. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Modbus is a fairly complicated protocol that requires a lot of reading etc.

    I suggest you buy a $3 ebay module USB->TTL serial converter. The PC sends or receives data in simple serial bytes, and the output of the module is TTL serial that can connect directly to a microcontroller's USART pins.

    There are freeware PC programs that will send or receive the serial data; "terminal" type programs.
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    There are many free Modbus tutorials out there, but to send and receive organized reading, writing and control of I/O devices from PC to a Micro requires some kind of formal program at both ends, a simple Terminal program will not usually cut it.
    There is also controllers at the terminal end such as PLC's that have Modbus built in, so the only other programming requirement would be at the PC end.
    Modbus field equipment usually has RS485 protocol for which there is many very cheap adapters from either RS232 or USB.
    Max.
     
  8. samjesse

    Thread Starter Active Member

    Sep 14, 2008
    202
    0
    I found Atmega32 microcontroller tutorials and much helpful info at https://www.newbiehack.com/
    As newbi as I am with microcontroller and knowing some C++, I found it a good start using the Programmer notepad, Atmel Studio 6 and WinAVR.

    I am not sure if it uses the Modbus protocol or not, but will I come across a known problem later with this MC?

    Thank you
     
Loading...