suraj56 / sanguino

Automatically exported from code.google.com/p/sanguino
0 stars 0 forks source link

SoftSerial support #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. opening SoftSerialExample on Arduino 1.0.1
2. when compiling Arduino software indicates Error Compiling
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

I want to know if Sanguino also supports the use of SoftSerial Library?

Original issue reported on code.google.com by JRVillan...@gmail.com on 24 Sep 2012 at 3:13

GoogleCodeExporter commented 8 years ago
There is a bug with PCINTs that keeps softserial from working.  Should have a 
fix in the next release

Original comment by sutt...@gmail.com on 24 Sep 2012 at 11:59

GoogleCodeExporter commented 8 years ago
Thank you very much for the info. Will be looking forward to the next release.

Original comment by JRVillan...@gmail.com on 25 Sep 2012 at 1:56

GoogleCodeExporter commented 8 years ago
I too will earnestly look forward to  bug fixing.

Original comment by pwdande...@gmail.com on 6 Oct 2012 at 4:11

GoogleCodeExporter commented 8 years ago
fix is in the source repo need to do further testing before package is released

Original comment by sutt...@gmail.com on 21 Oct 2012 at 5:57

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I been digging around for a solution I finally found a good fix. I have tested 
this code and it works like a charm. Update the pins_arduino.h within the 
following dictionary: \arduino-1.0.3\hardware\sanguino\variants\standard. I 
re-burned my atmega644p just to be safe, I don't know if you have  to. I have 
attached the pins_arduino.h file with the modification, just replace the old 
one with this file.

The following was added to the pins_arduino.h sketch.

#define NUM_DIGITAL_PINS            24
#define NUM_ANALOG_INPUTS           8

#define analogInputToDigitalPin(p)  ((p < 7) ? (p) + 24 : -1)

#define digitalPinHasPWM(p)         ((p) == 3 || (p) == 4 || (p) == 12 || (p) 
== 13 || (p) == 14 || (p) == 15 )

#define digitalPinToPCICR(p)    ( (((p) >= 0) && ((p) <= 31)) ? (&PCICR) : 
((uint8_t *)0) )

#define digitalPinToPCICRbit(p) ( (((p) >= 24) && ((p) <= 31)) ? 0 : \
                                ( (((p) >=  0) && ((p) <=  7)) ? 1 : \
                                ( (((p) >= 16) && ((p) <= 23)) ? 2 : \
                                ( (((p) >=  8) && ((p) <= 15)) ? 3 : \
                                0 ) ) ) )

#define digitalPinToPCMSK(p)    ( (((p) >= 24) && ((p) <= 31)) ? (&PCMSK0) : \
                                ( (((p) >=  0) && ((p) <=  7)) ? (&PCMSK1) : \
                                ( (((p) >= 16) && ((p) <= 23)) ? (&PCMSK2) : \
                                ( (((p) >=  8) && ((p) <= 15)) ? (&PCMSK3) : \
                                ((uint8_t *)0) ) ) ) )

#define digitalPinToPCMSKbit(p) ( (((p) >= 24) && ((p) <= 31)) ? (31 - (p)) : \
                                ( (((p) >=  0) && ((p) <=  7)) ? (p) : \
                                ( (((p) >= 16) && ((p) <= 23)) ? ((p) - 16) : \
                                ( (((p) >=  8) && ((p) <= 15)) ? ((p) - 8) : \
                                0 ) ) ) )

Original comment by yassirsh...@gmail.com on 26 Feb 2013 at 8:21

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! I can verify it compiles, haven't tried it out yet. Can we suggest 
folding this into the main release once it checks out?

Karen

Original comment by nasuka...@gmail.com on 3 Mar 2013 at 2:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Replaced the pins_arduino.h file with the one on #7 above, and it works great.

Thanks!

Javier

Original comment by KC2QII@gmail.com on 23 May 2013 at 11:30