Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
I am trying to use ATMEga48 for multiplexing PLC outputs
I have not done this before , I am reading the data sheet and
I am not sure if i need a xtal (crystal ).
Please help.
I have no idea what PLC is but regarding this xtal:
ATMEL chips (all of them) have a 8MHz crystal inside them. In factory they are divided by 8 so they operate at 1MHz (default value of xtal of the AVR chip). It can be put back to 8MHz by changing the right fuse bit in the chip.
But as it's internal it's reasonably unstable and it is far from 1MHz sharp. it can be +- 1% (or was that 5%) so if you need something very timing critical, then you are better off with external one. Everyone says, that you can't use USART with internal as it's too bad, but I have done it many many times and have found nothing wrong with it. Matter of taste and need
If you need something faster or more accurate, then buy a crystal (or a resonator) and connect it like shown in the datasheet of the Mega48.
A PLC is a programmable logic controller.
A silicon integrated circuit is very unlikely to have quartz crystal inside the package. What it does have is an onboard oscillator that may or may not be factory trimmed to some specified level of accuaracy.
In asyncronous communications plus or minus 2% on the baudrate should work. For example at 9600 baud anything from 9408 to 9792 has a pretty good chance of working. I've personally used 9535 and 9615 as actual baudrates with no fallouts over several thousand units.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.