View previous topic :: View next topic |
Author |
Message |
ghostmanzero
Joined: 01 Jan 2017 Posts: 12
|
Software int RDA with 12f675 |
Posted: Tue Jun 06, 2017 12:06 pm |
|
|
Hi everyone, I'm working on a simple rf example. I want to design it as cheap as possible. rs232 communication is ok. But it looks like 12f675 doesn't support an rda interrupt. Because compiler didn't compile it.
"Error: invalid pre-processor directive" that's the error message that i got.
Is it possible to create a kind of software rda interrupt with ordinary interrupt function ? Would it work like rda ? Baud rate will be 1200 or 2400. I will just control 2 LEDs which are on the receiver by two buttons which are on the transmitter.
Can anybody help me to find a solution, please? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Tue Jun 06, 2017 1:09 pm |
|
|
Yes, you can use any I/O pin of the 12F675 as a software UART input as it has selectable Interrupt on change for all the pins, usually you'd use GP2 the 'external interrupt' pin though.
You need to remember, if using the internal oscilator , it's not too accurate, though at 1200 or 2400 baud, it should be fine.
Also software UARTs have NO HW buffering, so it's up to YOU, the programmer to handle the 'details'.
You may want to see about prices for small PICs that have a HW UART. It may be possible to find one with HW UART and more memory for less than the 12F675 !
Jay |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1355
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Tue Jun 06, 2017 1:30 pm |
|
|
Get the 12F1822.
This has a hardware UART. RX on RA5 movable to RA1.
Cheaper. About 2/3rd the price. (Microchip want to sell the newer chips rather than the older ones...).
Faster.
2* the RAM, 2* the ROM. |
|
|
|