HDLC with ATMega

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

Hello all, I am trying to make a microcontroller based card that can communicate with a system communicating via HDLC. As much as I have googled following are the findings please suggest am I correct in understanding the way of action
1. To use 85C30 MCU to communicate as bridge between system and ATMega.
2. To use Arduino and using arduHDLC library to interface with system. Is this library really able to handle HDLC? Any limitations? I have no idea which Arduino to use. Zero interaction with Arduino.
Please suggest if any other idea for the implementation?

Last Edited: Sun. Jun 2, 2019 - 05:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hdlc only describes the method. You’ve not told us what device you want to talk to using hdlc and what baud rate etc.

The 85C30 is a serial peripheral, not a mcu. Tells us a bit more about what you want.

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

Extremely sorry for being late. I have an old card that uses LN80C51 MCU responsible to communicate with system throwing hdlc data at 125kpbs. This MCU is obsolete now and I want to replace this card by my design. what solution to achieve HDLC do I have?

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

Still not enough information. Do you have a reference to the LN80C51 processor? At a guess, I'd probably be looking at a psoc4 processor.

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

Does the current board have the 85C30?

 

It looks like the arduHDLC library merely creates HDLC frames with "start-byte, data, CRC, end-byte", but needs additional support for putting those bytes on an actual physical medium.

"Full" HDLC generally involves transmitting and receiving clocked "flag/idle" bytes continuously (which are ignored, hopefully by the hardware), and doing bit-stuffing to handle the case where a bit pattern matching the flag or end-byte would be generated.   Doing this on an AVR (at least the ones I'm familiar with) would be very challenging - the USART hardware, while it supports "synchronous" operation, does not have any of the added features (continuous clocking, bit stuffing, idle character recognition, etc.)  At 125kbps, you MIGHT almost be able to bit-bang things.  But it would be ... really close.

 

The 85C30 is quite old, and there are other chips that provide similar capabilities.  The MK5025 was our favorite (but it's of similar age.)   Motorola/Freescale/NXP offer microprocessors with fancy built-in serial controllers that will do it.

 

On the other hand, there are simpler things that occasionally get labeled as "HDLC."  The common (used-to-be common) PPP protocol uses a somewhat modified "Aysnc HDLC" as its link-level protocol.

 

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

Correction: The card uses LN80C152. LN80C51 was a typo.

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

Thanks for suggestions yes these ICs are obsolete that's why I want some available solution.

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

Had you been upfront with more information, you might get a better response.
Generating the send data using an avr is doable but processing the receive data gets a bit trickier.
When the replacement for an obsolete chip goes obsolete, then you know you’re in trouble!

Something like a psoc5 chip would allow you to build the read data recovery with its programmable logic. Depends how creative you want to be but there’s a bit of work involved methinks.
Using an old chip like the 85c30 seems like you are digging yourself the same hole - its older than the 80c152

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

The (Microchip!  (Via microsemit via Zarlink?)) MT8952B looks to be reasonably current (on sale at digikey; not marked as obsolete.)

I found a couple articles on implementing it in FPGA or CPLD.  It can't be THAT hard; chips the the 8530 and 5025 date back over 30 years.  (I bet there's a neat hardware trick to the bit stuffing/removal.  But I don't know what it is!)

(https://pdfs.semanticscholar.org... looks particularly helpful, containing a bunch of theory?)

 

Most "modern" chips with HDLC support do things like supporting "many" HDLC channels on a TDM bus (ie ISDN Primary Rate interfaces scatter-gathering 64kbs channels from the telco T1 line.)