Hi,
I am a newbie with Arduino. I search on the web page and the web for information on how to set up the serial port for a nine bit and if the serial port has an interrupt that can be use. I am working on a project where I need the ninth bit as an address mode to a device. also I want to use the other serial port as a eight bit with the interrupt. I have accomplish this using MircoChip Pic but would like to use the MEGA board for this because of the analog on the board.I hope someone can direct me to a link or data for the information.
Thanks
Dorato
I search on the web page and the web for information on how to set up the serial port for a nine bit
There have been several discussions on how to do this. I'm surprised you can't find anything.
and if the serial port has an interrupt that can be use.
Serial data transmission and receipt uses interrupts. You can't piggyback on them.
also I want to use the other serial port as a eight bit with the interrupt.
What, exactly, do you expect to do each time a character arrives, the instant it arrives? Polling in loop() is the proper way to deal with serial data. If you don't think you can, your code is wrong.
I did a project using Microchip PIC18F using both serial port. Port one received and transmit 8 data with the interrupt active. So when the end user sent data the PIC would act on the interrupt. Serial port 2 was on a MDB line which I use the nine bit to transmit an address data so the other devices on the bus knew which one that is being talk to. I would like to convert my code to the mega board. I am looking for PDF file or a book on information on how to set the registers to do special function. If you look up a PIC chip you can find the information on how to set up the registers in the chip. I am looking to do the same with the Arduino boards. The Arduino boards has more feature then the PIC chip that I need for a new project..
I found a document that has the information I needed. I went back to Microchip forum and of course they were more helpful in directing me to the right information.
So when the end user sent data the PIC would act on the interrupt.
The Arduino handles the interrupt for you, storing the data in a buffer. You can tell how much data is in the buffer using SerialN.available().
I am looking for PDF file or a book on information on how to set the registers to do special function.
What registers? What special function? The ATMEL datasheet has all the information on the registers and how to read and write to them. Most of the registers are handled automatically by higher level functions, though, so much of the information in the datasheet is of limited interest.
dorato:
I found a document that has the information I needed. I went back to Microchip forum and of course they were more helpful in directing me to the right information.
Don't judge the forum just on some persons "help" responses. 8)
If a kid asks where rain comes from, I think a cute thing to tell him is "God is crying." And if he asks why God is crying, another cute thing to tell him is "Probably because of something you did." - PaulS
Hey I was not putting this forum down. all I was looking for was some information and since I was in Microchip forum someone there directed me to it. Please don't take offense to it. The Auduino is new to me and I was just trying to locate the document I was searching for. Thanks to all that replied.