Giter Club home page Giter Club logo

Comments (12)

kg4sgp avatar kg4sgp commented on September 27, 2024

Hi!

The original target platform was the Arduino Uno. I just verified the code in arduino-rtty/rtty/rtty.ino builds for this platform and produces decode-able rtty.

It looks like the PJRC teensy 2.0 uses the ATmega32 from the schematic on https://www.pjrc.com/teensy/schematic.html . This will take a little porting. I'll do my best but I don't have a board to test with. I'd be happy to work with you to get this working.

Looking at the datasheet it looks like timer 2 only has one output compare register. Essentially where we see OCRB2 we would replace it with OCR2.

It also looks like the setup of the timer control registers is different. I went ahead and tried to set up timer to for fast PWM, /8 prescale, clear on output compare.

The output appears to be on the Port D7 "D7" pin. I've made the changes in the code and placed them at https://github.com/kg4sgp/arduino-rtty/tree/master/rttyteensy

Let me know what you find,
KG4SGP - Jim

from arduino-rtty.

kg4sgp avatar kg4sgp commented on September 27, 2024

Also,

This code was written two years (or so) ago. Its pretty ugly, in my opinion, and not exactly the best to be making a library out of. None the less it does produce PWM RTTY.

I've been working on code that I haven't yet put on github which has several improvements including better frequency accuracy among others. I'll notify you when I eventually get that up on github.

KG4SGP - Jim

from arduino-rtty.

SnkMtn000 avatar SnkMtn000 commented on September 27, 2024

Jim,

Thanks for the quick response. Can't really call porting issues a bug but
it is a communication vehicle.

My goal is to use any avr to produce rtty. Last night I was able to output
audio RTTY on the teensy and decode it with fldigi. I got an RF1101SE and
am looking to turn-key the process.

I tried you new code and got the error below.


Arduino: 1.6.5 (Linux), TD: 1.24, Board: "Teensy 2.0, Serial, 16 MHz, US
English"

extern void _calloc(size_t nele, size_t __size) __ATTR_MALLOC;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdlib.h:327:36:
error: 'size_t' was not declared in this scope
extern void *calloc(size_t nele, size_t __size) __ATTR_MALLOC;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdlib.h:327:51:
error: expression list treated as compound expression in initializer
[-fpermissive]
extern void *calloc(size_t nele, size_t __size) __ATTR_MALLOC;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdlib.h:346:35:
error: 'size_t' has not been declared
extern void *realloc(void *ptr, size_t __size) __ATTR_MALLOC;
^
In file included from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:5:0,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:114:49:
error: 'size_t' has not been declared
extern void *memccpy(void *, const void *, int, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:115:40:
error: 'size_t' has not been declared
extern void *memchr(const void *, int, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:116:47:
error: 'size_t' has not been declared
extern int memcmp(const void *, const void *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:117:43:
error: 'size_t' has not been declared
extern void *memcpy(void *, const void *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:118:35:
error: 'size_t' has not been declared
extern void *memmem(const void *, size_t, const void *, size_t)
ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:118:57:
error: 'size_t' has not been declared
extern void *memmem(const void *, size_t, const void *, size_t)
ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:119:44:
error: 'size_t' has not been declared
extern void *memmove(void *, const void *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:120:41:
error: 'size_t' has not been declared
extern void *memrchr(const void *, int, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:121:34:
error: 'size_t' has not been declared
extern void *memset(void *, int, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:129:8:
error: 'size_t' does not name a type
extern size_t strcspn(const char **s, const char __reject) __ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:131:8:
error: 'size_t' does not name a type
extern size_t strlcat(char *, const char *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:132:8:
error: 'size_t' does not name a type
extern size_t strlcpy(char *, const char *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:133:8:
error: 'size_t' does not name a type
extern size_t strlen(const char *) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:135:44:
error: 'size_t' has not been declared
extern char *strncat(char *, const char *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:136:48:
error: 'size_t' has not been declared
extern int strncmp(const char *, const char *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:137:44:
error: 'size_t' has not been declared
extern char *strncpy(char *, const char *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:138:52:
error: 'size_t' has not been declared
extern int strncasecmp(const char *, const char *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:139:8:
error: 'size_t' does not name a type
extern size_t strnlen(const char *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/string.h:144:8:
error: 'size_t' does not name a type
extern size_t strspn(const char **s, const char __accept) __ATTR_PURE;
^
In file included from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:24:0,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:24,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdio.h:685:32:
error: 'size_t' has not been declared
extern int snprintf(char ***s, size_t __n, const char *__fmt, ...);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdio.h:691:34:
error: 'size_t' has not been declared
extern int snprintf_P(char *__s, size_t __n, const char *__fmt, ...);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdio.h:713:33:
error: 'size_t' has not been declared
extern int vsnprintf(char *__s, size_t __n, const char *__fmt, va_list ap);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdio.h:719:35:
error: 'size_t' has not been declared
extern int vsnprintf_P(char *__s, size_t __n, const char *__fmt, va_list
ap);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdio.h:762:8:
error: 'size_t' does not name a type
extern size_t fwrite(const void *__ptr, size_t __size, size_t _nmemb,
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/stdio.h:840:8:
error: 'size_t' does not name a type
extern size_t fread(void __ptr, size_t __size, size_t __nmemb,
^
In file included from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WString.h:29:0,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:27,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:24,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1137:55:
error: 'size_t' has not been declared
extern const void * memchr_P(const void , int __val, size_t __len)
__ATTR_CONST
;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1138:49:
error: 'size_t' has not been declared
extern int memcmp_P(const void *, const void *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1139:57:
error: 'size_t' has not been declared
extern void *memccpy_P(void *, const void *, int **val, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1140:45:
error: 'size_t' has not been declared
extern void *memcpy_P(void *, const void *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1141:37:
error: 'size_t' has not been declared
extern void *memmem_P(const void , size_t, const void , size_t)
__ATTR_PURE
;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1141:59:
error: 'size_t' has not been declared
extern void *memmem_P(const void *, size_t, const void *, size_t)
ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1142:56:
error: 'size_t' has not been declared
extern const void * memrchr_P(const void *, int val, size_t __len)
__ATTR_CONST
;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1150:8:
error: 'size_t' does not name a type
extern size_t strcspn_P(const char *s, const char * __reject)
__ATTR_PURE
;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1151:8:
error: 'size_t' does not name a type
extern size_t strlcat_P (char *, const char *, size_t );
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1152:8:
error: 'size_t' does not name a type
extern size_t strlcpy_P (char *, const char *, size_t );
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1153:8:
error: 'size_t' does not name a type
extern size_t *strlen_P(const char ) __ATTR_CONST; /
program memory
can't change /
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1154:8:
error: 'size_t' does not name a type
extern size_t strnlen_P(const char *, size_t) ATTR_CONST; /
program
memory can't change /
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1155:50:
error: 'size_t' has not been declared
extern int strncmp_P(const char *, const char *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1156:54:
error: 'size_t' has not been declared
extern int strncasecmp_P(const char *, const char *, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1157:46:
error: 'size_t' has not been declared
extern char *strncat_P(char *, const char *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1158:46:
error: 'size_t' has not been declared
extern char *strncpy_P(char *, const char *, size_t);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1162:8:
error: 'size_t' does not name a type
extern size_t strspn_P(const char *s, const char * __accept)
__ATTR_PURE
;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1167:8:
error: 'size_t' does not name a type
extern size_t strlen_PF (uint_farptr_t src) ATTR_CONST; /
program
memory can't change /
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1168:8:
error: 'size_t' does not name a type
extern size_t strnlen_PF (uint_farptr_t src, size_t len) ATTR_CONST; /

program memory can't change */
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1169:56:
error: 'size_t' has not been declared
extern void *memcpy_PF (void *dest, uint_farptr_t src, size_t len);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1171:57:
error: 'size_t' has not been declared
extern char *strncpy_PF (char *dest, uint_farptr_t src, size_t len);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1173:8:
error: 'size_t' does not name a type
extern size_t strlcat_PF (char *dst, uint_farptr_t src, size_t siz);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1174:57:
error: 'size_t' has not been declared
extern char *strncat_PF (char *dest, uint_farptr_t src, size_t len);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1176:58:
error: 'size_t' has not been declared
extern int strncmp_PF (const char *s1, uint_farptr_t s2, size_t n)
ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1178:62:
error: 'size_t' has not been declared
extern int strncasecmp_PF (const char *s1, uint_farptr_t s2, size_t n)
ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1180:8:
error: 'size_t' does not name a type
extern size_t strlcpy_PF (char *dst, uint_farptr_t src, size_t siz);
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1181:51:
error: 'size_t' has not been declared
extern int memcmp_PF(const void *, uint_farptr_t, size_t) ATTR_PURE;
^
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1184:50:
error: 'size_t' does not name a type
attribute((always_inline)) static inline size_t strlen_P(const char

  • s);
    ^
    /home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/pgmspace.h:1185:15:
    error: 'size_t' does not name a type
    static inline size_t strlen_P(const char _s) {
    ^
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Printable.h:26:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:28,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:24,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/new.h:12:21:
    error: declaration of 'operator new' as non-function
    void * operator new(size_t size);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/new.h:12:21:
    error: 'size_t' was not declared in this scope
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/new.h:13:23:
    error: declaration of 'operator new []' as non-function
    void * operator new[](size_t size);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/new.h:13:23:
    error: 'size_t' was not declared in this scope
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:28:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:24,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Printable.h:38:13:
    error: 'size_t' does not name a type
    virtual size_t printTo(Print& p) const = 0;
    ^
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:24:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:43:10:
    error: 'size_t' does not name a type
    virtual size_t write(uint8_t b);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:44:2:
    error: 'size_t' does not name a type
    size_t write(const char *str) { return write((const uint8_t *)str,
    strlen(str)); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:45:10:
    error: 'size_t' does not name a type
    virtual size_t write(const uint8_t *buffer, size_t size);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:46:2:
    error: 'size_t' does not name a type
    size_t write(const char *buffer, size_t size) { return write((const
    uint8_t *)buffer, size); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:47:2:
    error: 'size_t' does not name a type
    size_t print(const String &s);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:48:2:
    error: 'size_t' does not name a type
    size_t print(char c) { return write((uint8_t)c); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:49:2:
    error: 'size_t' does not name a type
    size_t print(const char s[]) { return write(s); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:50:2:
    error: 'size_t' does not name a type
    size_t print(const __FlashStringHelper *f);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:52:2:
    error: 'size_t' does not name a type
    size_t print(uint8_t b) { return printNumber(b, 0, 10); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:53:2:
    error: 'size_t' does not name a type
    size_t print(int n) { return print((long)n); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:54:2:
    error: 'size_t' does not name a type
    size_t print(unsigned int n) { return printNumber(n, 0, 10); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:55:2:
    error: 'size_t' does not name a type
    size_t print(long n);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:56:2:
    error: 'size_t' does not name a type
    size_t print(unsigned long n) { return printNumber(n, 0, 10); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:58:2:
    error: 'size_t' does not name a type
    size_t print(unsigned char n, int base) { return printNumber(n, 0, base); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:59:2:
    error: 'size_t' does not name a type
    size_t print(int n, int base) { return (base == 10) ? print(n) :
    printNumber(n, 0, base); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:60:2:
    error: 'size_t' does not name a type
    size_t print(unsigned int n, int base) { return printNumber(n, 0, base); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:61:2:
    error: 'size_t' does not name a type
    size_t print(long n, int base) { return (base == 10) ? print(n) :
    printNumber(n, 0, base); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:62:2:
    error: 'size_t' does not name a type
    size_t print(unsigned long n, int base) { return printNumber(n, 0, base); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:64:2:
    error: 'size_t' does not name a type
    size_t print(double n, int digits = 2) { return printFloat(n, digits); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:65:2:
    error: 'size_t' does not name a type
    size_t print(const Printable &obj) { return obj.printTo(_this); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:66:2:
    error: 'size_t' does not name a type
    size_t println(void);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:67:2:
    error: 'size_t' does not name a type
    size_t println(const String &s) { return print(s) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:68:2:
    error: 'size_t' does not name a type
    size_t println(char c) { return print(c) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:69:2:
    error: 'size_t' does not name a type
    size_t println(const char s[]) { return print(s) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:70:2:
    error: 'size_t' does not name a type
    size_t println(const FlashStringHelper _f) { return print(f) + println();
    }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:72:2:
    error: 'size_t' does not name a type
    size_t println(uint8_t b) { return print(b) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:73:2:
    error: 'size_t' does not name a type
    size_t println(int n) { return print(n) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:74:2:
    error: 'size_t' does not name a type
    size_t println(unsigned int n) { return print(n) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:75:2:
    error: 'size_t' does not name a type
    size_t println(long n) { return print(n) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:76:2:
    error: 'size_t' does not name a type
    size_t println(unsigned long n) { return print(n) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:78:2:
    error: 'size_t' does not name a type
    size_t println(unsigned char n, int base) { return print(n, base) +
    println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:79:2:
    error: 'size_t' does not name a type
    size_t println(int n, int base) { return print(n, base) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:80:2:
    error: 'size_t' does not name a type
    size_t println(unsigned int n, int base) { return print(n, base) +
    println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:81:2:
    error: 'size_t' does not name a type
    size_t println(long n, int base) { return print(n, base) + println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:82:2:
    error: 'size_t' does not name a type
    size_t println(unsigned long n, int base) { return print(n, base) +
    println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:84:2:
    error: 'size_t' does not name a type
    size_t println(double n, int digits = 2) { return print(n, digits) +
    println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:85:2:
    error: 'size_t' does not name a type
    size_t println(const Printable &obj) { return obj.printTo(_this) +
    println(); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:94:2:
    error: 'size_t' does not name a type
    size_t printNumberDec(unsigned long n, uint8_t sign);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:95:2:
    error: 'size_t' does not name a type
    size_t printNumberHex(unsigned long n);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:96:2:
    error: 'size_t' does not name a type
    size_t printNumberBin(unsigned long n);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:97:2:
    error: 'size_t' does not name a type
    size_t printNumberAny(unsigned long n, uint8_t base);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:98:9:
    error: 'size_t' does not name a type
    inline size_t printNumber(unsigned long n, uint8_t sign, uint8_t base)
    __attribute
    ((always_inline)) {
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Print.h:108:2:
    error: 'size_t' does not name a type
    size_t printFloat(double n, uint8_t digits);
    ^
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:38:26:
    error: 'size_t' has not been declared
    bool find(char *target, size_t length);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:39:29:
    error: 'size_t' has not been declared
    bool find(uint8_t *target, size_t length) { return find ((char *)target,
    length); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:42:31:
    error: 'size_t' has not been declared
    bool findUntil(char *target, size_t targetLen, char *terminate, size_t
    termLen);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:42:66:
    error: 'size_t' has not been declared
    bool findUntil(char *target, size_t targetLen, char *terminate, size_t
    termLen);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:43:34:
    error: 'size_t' has not been declared
    bool findUntil(uint8_t *target, size_t targetLen, char *terminate, size_t
    termLen) {return findUntil((char *)target, targetLen, terminate, termLen); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:43:69:
    error: 'size_t' has not been declared
    bool findUntil(uint8_t *target, size_t targetLen, char *terminate, size_t
    termLen) {return findUntil((char *)target, targetLen, terminate, termLen); }
    ^
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:6:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:48:2:
    error: 'size_t' does not name a type
    size_t readBytes(char *buffer, size_t length);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:49:2:
    error: 'size_t' does not name a type
    size_t readBytes( uint8_t *buffer, size_t length) { return readBytes((char
    *)buffer, length); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:50:2:
    error: 'size_t' does not name a type
    size_t readBytesUntil(char terminator, char *buffer, size_t length);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:51:2:
    error: 'size_t' does not name a type
    size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length) {
    return readBytesUntil(terminator, (char *)buffer, length); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:52:20:
    error: 'size_t' has not been declared
    String readString(size_t max = 120);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Stream.h:53:42:
    error: 'size_t' has not been declared
    String readStringUntil(char terminator, size_t max = 120);
    ^
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/usb_api.h:2:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:22,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:18:10:
    error: 'size_t' does not name a type
    virtual size_t write(uint8_t c) { return write(&c, 1); }
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:19:10:
    error: 'size_t' does not name a type
    virtual size_t write(const uint8_t *buffer, uint16_t size);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:20:15:
    error: no members matching 'Print::write' in 'class Print'
    using Print::write;
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/../usb_serial/usb_api.h:37:2:
    error: 'size_t' does not name a type
    size_t readBytes(char *buffer, size_t length);
    ^
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:25:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/HardwareSerial.h:23:10:
    error: 'size_t' does not name a type
    virtual size_t write(uint8_t);
    ^
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/HardwareSerial.h:27:15:
    error: no members matching 'Print::write' in 'class Print'
    using Print::write;
    ^
    rtty:12: error: 'sine' was not declared in this scope
    rtty.ino: In function 'void setup()':
    rtty:51: error: 'TCCR2A' was not declared in this scope
    In file included from
    /home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/io.h:99:0,
    from
    /home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/interrupt.h:38,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    rtty:51: error: 'COM2B1' was not declared in this scope
    rtty:51: error: 'WGM21' was not declared in this scope
    rtty:51: error: 'WGM20' was not declared in this scope
    rtty:52: error: 'TCCR2B' was not declared in this scope
    In file included from
    /home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/io.h:99:0,
    from
    /home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/interrupt.h:38,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    rtty:52: error: 'CS21' was not declared in this scope
    rtty:57: error: 'class usb_serial_class' has no member named 'println'
    rtty.ino: In function 'void loop()':
    rtty:67: error: 'class usb_serial_class' has no member named 'println'
    rtty.ino: In function 'char calcAmp()':
    rtty:81: error: 'sine' was not declared in this scope
    rtty.ino: In function 'void setCbuff()':
    rtty:95: error: 'baudot_letters' was not declared in this scope
    rtty:103: error: 'baudot' was not declared in this scope
    rtty:106: error: 'baudot' was not declared in this scope
    rtty:112: error: 'baudot_figures' was not declared in this scope
    rtty:115: error: 'baudot' was not declared in this scope
    rtty:118: error: 'baudot' was not declared in this scope
    In file included from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18:0,
    from
    /home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
    from rtty.ino:10:
    rtty.ino: In function 'void TIMER2_OVF_vect()':
    rtty.ino:142:5: warning: 'TIMER2_OVF_vect' appears to be a misspelled
    signal handler [enabled by default]
    rtty:189: error: 'OCR2B' was not declared in this scope
    rttyteensy.ino: At global scope:
    rttyteensy:4: error: expected unqualified-id before '<' token
    rttyteensy:463: error: expected unqualified-id before '<' token
    rttyteensy:463: error: expected unqualified-id before '<' token
    rttyteensy:467: error: expected unqualified-id before '<' token
    rttyteensy:467: error: expected unqualified-id before '<' token
    rttyteensy:489: error: expected unqualified-id before '<' token
    rttyteensy:493: error: expected unqualified-id before '<' token
    rttyteensy:497: error: expected unqualified-id before '<' token
    rttyteensy:501: error: expected unqualified-id before '<' token
    rttyteensy:505: error: expected unqualified-id before '<' token
    rttyteensy:509: error: expected unqualified-id before '<' token
    rttyteensy:513: error: expected unqualified-id before '<' token
    rttyteensy:517: error: expected unqualified-id before '<' token
    rttyteensy:526: error: expected unqualified-id before '<' token
    rttyteensy:530: error: expected unqualified-id before '<' token
    rttyteensy:534: error: expected unqualified-id before '<' token
    rttyteensy:538: error: expected unqualified-id before '<' token
    rttyteensy:542: error: expected unqualified-id before '<' token
    rttyteensy:551: error: expected unqualified-id before '<' token
    rttyteensy:555: error: expected unqualified-id before '<' token
    rttyteensy:559: error: expected unqualified-id before '<' token
    rttyteensy:568: error: expected unqualified-id before '<' token
    rttyteensy:572: error: expected unqualified-id before '<' token
    rttyteensy:576: error: expected unqualified-id before '<' token
    rttyteensy:585: error: expected unqualified-id before '<' token
    rttyteensy:585: error: expected unqualified-id before '<' token
    rttyteensy:585: error: expected unqualified-id before '<' token
    rttyteensy:598: error: expected unqualified-id before '<' token
    rttyteensy:602: error: expected unqualified-id before '<' token
    rttyteensy:606: error: expected unqualified-id before '<' token
    rttyteensy:610: error: expected unqualified-id before '<' token
    rttyteensy:724: error: expected unqualified-id before '<' token
    rtty.ino: In function 'char calcAmp()':
    rtty.ino:82:1: warning: control reaches end of non-void function
    [-Wreturn-type]
    expected unqualified-id before '<' token

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.

On Sat, Jul 18, 2015 at 12:48 AM, Jimmy Carter [email protected]
wrote:

Hi!

The original target platform was the Arduino Uno. I just verified the code
in arduino-rtty/rtty/rtty.ino builds for this platform and produces
decode-able rtty.

It looks like the PJRC teensy 2.0 uses the ATmega32 from the schematic on
https://www.pjrc.com/teensy/schematic.html . This will take a little
porting. I'll do my best but I don't have a board to test with. I'd be
happy to work with you to get this working.

Looking at the datasheet it looks like timer 2 only has one output compare
register. Essentially where we see OCRB2 we would replace it with OCR2.

It also looks like the setup of the timer control registers are different.
I went ahead and tried to set up timer to for fast PWM, /8 prescale, clear
on output compare.

The output appears to be on the Port D7 "D7" pin. I've made the changes in
the code and placed them at
https://github.com/kg4sgp/arduino-rtty/tree/master/rttyteensy

Let me know what you find,
KG4SGP - Jim


Reply to this email directly or view it on GitHub
#8 (comment).

from arduino-rtty.

SnkMtn000 avatar SnkMtn000 commented on September 27, 2024

Jimmy,

I hope you got a good chuckle with the errors I sent yesterday. Yep cannot
compile html! :P

I fixed that but did get another, real compile error. I'll dig into the
code and data sheets myself.

Arduino: 1.6.5 (Linux), TD: 1.24, Board: "Teensy 2.0, Serial, 16 MHz, US
English"

rtty.ino: In function 'void setup()':
rtty:51: error: 'TCCR2A' was not declared in this scope
In file included from
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/io.h:99:0,
from
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/interrupt.h:38,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
rtty:51: error: 'COM2B1' was not declared in this scope
rtty:51: error: 'WGM21' was not declared in this scope
rtty:51: error: 'WGM20' was not declared in this scope
rtty:52: error: 'TCCR2B' was not declared in this scope
In file included from
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/io.h:99:0,
from
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/interrupt.h:38,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
rtty:52: error: 'CS21' was not declared in this scope
rtty.ino: In function 'void setCbuff()':
rtty.ino:95:56: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
In file included from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18:0,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
rtty.ino: In function 'void TIMER2_OVF_vect()':
rtty.ino:142:5: warning: 'TIMER2_OVF_vect' appears to be a misspelled
signal handler [enabled by default]
rtty:189: error: 'OCR2B' was not declared in this scope
In file included from rttyteensy.ino:4:0:
/tmp/build2161251840297795793.tmp/baudot.h: At global scope:
baudot.h:3: error: redefinition of 'unsigned char baudot_figures []'
unsigned char baudot_figures[] = {
^
In file included from rtty.ino:4:0:
baudot.h:3: error: 'unsigned char baudot_figures [30]' previously defined
here
unsigned char baudot_figures[] = {
^
In file included from rttyteensy.ino:4:0:
baudot.h:36: error: redefinition of 'unsigned char baudot_letters []'
unsigned char baudot_letters[] = {
^
In file included from rtty.ino:4:0:
baudot.h:36: error: 'unsigned char baudot_letters [30]' previously defined
here
unsigned char baudot_letters[] = {
^
In file included from rttyteensy.ino:4:0:
baudot.h:70: error: redefinition of 'unsigned char baudot []'
unsigned char baudot[] = {
^
In file included from rtty.ino:4:0:
baudot.h:70: error: 'unsigned char baudot [32]' previously defined here
unsigned char baudot[] = {
^
In file included from rttyteensy.ino:5:0:
pwmsine.h:1: error: redefinition of 'unsigned char sine []'
unsigned char sine[] = { 0, 0, 0, 1, 1, 1, 2, 2, 3, 3,
^
In file included from rtty.ino:5:0:
pwmsine.h:1: error: 'unsigned char sine [1024]' previously defined here
unsigned char sine[] = { 0, 0, 0, 1, 1, 1, 2, 2, 3, 3,
^
rttyteensy:10: error: redefinition of 'char pflag'
rtty:10: error: 'char pflag' previously defined here
rttyteensy:11: error: redefinition of 'unsigned int sampleRate'
rtty:11: error: 'unsigned int sampleRate' previously defined here
rttyteensy:12: error: redefinition of 'unsigned int tableSize'
rtty:12: error: 'unsigned int tableSize' previously defined here
rttyteensy:13: error: redefinition of 'unsigned int pstn'
rtty:13: error: 'unsigned int pstn' previously defined here
rttyteensy:14: error: redefinition of 'int sign'
rtty:14: error: 'int sign' previously defined here
rttyteensy:15: error: redefinition of 'unsigned int change'
rtty:15: error: 'unsigned int change' previously defined here
rttyteensy:16: error: redefinition of 'unsigned int count'
rtty:16: error: 'unsigned int count' previously defined here
rttyteensy:17: error: redefinition of 'int sym'
rtty:17: error: 'int sym' previously defined here
rttyteensy:19: error: redefinition of 'int fmark'
rtty:19: error: 'int fmark' previously defined here
rttyteensy:20: error: redefinition of 'int fspac'
rtty:20: error: 'int fspac' previously defined here
rttyteensy:21: error: redefinition of 'int baud'
rtty:21: error: 'int baud' previously defined here
rttyteensy:22: error: redefinition of 'int bits'
rtty:22: error: 'int bits' previously defined here
rttyteensy:23: error: redefinition of 'char lsbf'
rtty:23: error: 'char lsbf' previously defined here
rttyteensy:25: error: redefinition of 'unsigned char bitPstn'
rtty:25: error: 'unsigned char bitPstn' previously defined here
rttyteensy:26: error: redefinition of 'int bytePstn'
rtty:26: error: 'int bytePstn' previously defined here
rttyteensy:27: error: redefinition of 'unsigned char tx'
rtty:27: error: 'unsigned char tx' previously defined here
rttyteensy:29: error: redefinition of 'unsigned char charbuf'
rtty:29: error: 'unsigned char charbuf' previously defined here
rttyteensy:30: error: redefinition of 'unsigned char shiftToNum'
rtty:30: error: 'unsigned char shiftToNum' previously defined here
rttyteensy:31: error: redefinition of 'unsigned char justshifted'
rtty:31: error: 'unsigned char justshifted' previously defined here
rttyteensy:33: error: redefinition of 'char msg []'
rtty:33: error: 'char msg [40]' previously defined here
rttyteensy:36: error: redefinition of 'unsigned int dmark'
rtty:36: error: 'unsigned int dmark' previously declared here
rttyteensy:37: error: redefinition of 'unsigned int dspac'
rtty:37: error: 'unsigned int dspac' previously declared here
rttyteensy:38: error: redefinition of 'int msgSize'
rtty:38: error: 'int msgSize' previously defined here
rttyteensy:39: error: redefinition of 'unsigned int sampPerSymb'
rtty:39: error: 'unsigned int sampPerSymb' previously declared here
rttyteensy.ino: In function 'void setup()':
rttyteensy:41: error: redefinition of 'void setup()'
rtty:41: error: 'void setup()' previously defined here
rttyteensy:57: error: 'TCCR2' was not declared in this scope
In file included from
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/io.h:99:0,
from
/home/cwebb/Programs/arduino165/hardware/tools/avrteensy/avr/include/avr/interrupt.h:38,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
rttyteensy:57: error: 'WGM21' was not declared in this scope
rttyteensy:57: error: 'WGM20' was not declared in this scope
rttyteensy:57: error: 'COM21' was not declared in this scope
rttyteensy:57: error: 'CS21' was not declared in this scope
rttyteensy.ino: In function 'void loop()':
rttyteensy:69: error: redefinition of 'void loop()'
rtty:64: error: 'void loop()' previously defined here
rttyteensy.ino: In function 'char calcAmp()':
rttyteensy:76: error: redefinition of 'char calcAmp()'
rtty:71: error: 'char calcAmp()' previously defined here
rttyteensy.ino: In function 'void setCbuff()':
rttyteensy:90: error: redefinition of 'void setCbuff()'
rtty:85: error: 'void setCbuff()' previously defined here
rttyteensy.ino:100:56: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
rttyteensy.ino: In function 'void setSymb(char)':
rttyteensy:133: error: redefinition of 'void setSymb(char)'
rtty:128: error: 'void setSymb(char)' previously defined here
In file included from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/WProgram.h:18:0,
from
/home/cwebb/Programs/arduino165/hardware/teensy/avr/cores/teensy/Arduino.h:1,
from rtty.ino:10:
rttyteensy.ino: In function 'void TIMER2_OVF_vect()':
rttyteensy:147: error: redefinition of 'void TIMER2_OVF_vect()'
rtty:142: error: 'void TIMER2_OVF_vect()' previously defined here
rttyteensy:194: error: 'OCR2' was not declared in this scope
'OCR2' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

On Sat, Jul 18, 2015 at 12:48 AM, Jimmy Carter [email protected]
wrote:

Hi!

The original target platform was the Arduino Uno. I just verified the code
in arduino-rtty/rtty/rtty.ino builds for this platform and produces
decode-able rtty.

It looks like the PJRC teensy 2.0 uses the ATmega32 from the schematic on
https://www.pjrc.com/teensy/schematic.html . This will take a little
porting. I'll do my best but I don't have a board to test with. I'd be
happy to work with you to get this working.

Looking at the datasheet it looks like timer 2 only has one output compare
register. Essentially where we see OCRB2 we would replace it with OCR2.

It also looks like the setup of the timer control registers are different.
I went ahead and tried to set up timer to for fast PWM, /8 prescale, clear
on output compare.

The output appears to be on the Port D7 "D7" pin. I've made the changes in
the code and placed them at
https://github.com/kg4sgp/arduino-rtty/tree/master/rttyteensy

Let me know what you find,
KG4SGP - Jim


Reply to this email directly or view it on GitHub
#8 (comment).

from arduino-rtty.

kg4sgp avatar kg4sgp commented on September 27, 2024

Hmmm. I'm going to download the teensyduino add-ons and get that setup tonight. I'll try to reproduce these errors and work through them.

from arduino-rtty.

kg4sgp avatar kg4sgp commented on September 27, 2024

Whops didn't see your second reply. XD It looks like there are some files that aren't being included. The definitions for the registers are included with avr/io.h which is usually included when arduino compiles a sketch. I'll take a look tonight.

from arduino-rtty.

kg4sgp avatar kg4sgp commented on September 27, 2024

Hi ceweuubsa,

Well I hope you had a good laugh with my previous files. I was using the wrong datasheet for the microcontroller: atmega32l instead of atmega32u4; apparently it makes a huge difference. I went and downloaded the files for teensyduino and compiled the code for the board you are using. It compiles, but that's about all that I can say for it.

Could you test this? The output should be on PB7, the "B7" labeled pin.

I may need to change line 59 from:
TIMSK0 = _BV(TOIE0);
to:
TIMSK0 = _BV(TOIE0) | _BV(OCIE0A);

but I'm not quite sure.

KG4SGP - Jim

from arduino-rtty.

SnkMtn000 avatar SnkMtn000 commented on September 27, 2024

Wrong device. Oops! Deleted.

from arduino-rtty.

kg4sgp avatar kg4sgp commented on September 27, 2024

ceweuubsa,

Im curious, did this fix your problem?

Looks like in the last post you compiled for the Teensy 3.1 instead of the Teensy 2.0.

from arduino-rtty.

SnkMtn000 avatar SnkMtn000 commented on September 27, 2024

Yes Teensy 3.1. I forgot to swap the device. I'll go back and delete that
compile entry as it was invalid to the thread. BTW I'm ordering an Uno as
the teensy's despite their small foot print have lots of issues with
vanilla Arduino code.

On Wed, Jul 22, 2015 at 9:09 PM, Jimmy Carter [email protected]
wrote:

ceweuubsa,

Im curious, did this fix your problem?

Looks like in the last post you compiled for the Teensy 3.1 instead of the
Teensy 2.0.


Reply to this email directly or view it on GitHub
#8 (comment).

from arduino-rtty.

SnkMtn000 avatar SnkMtn000 commented on September 27, 2024

OK compiles without error on Teensy 2.0. You chose Teensy pins 3 and 13 with are not PWM. ?? I get nothing. I guess you are referring to registers rather than PBo, PB1, etc.? Thanks.

from arduino-rtty.

kg4sgp avatar kg4sgp commented on September 27, 2024

For the Teensy the PWM output should currently appear on the Port B register, pin 7 a.k.a. PB7. I'll include documentation as such.

Sorry about the confusion. In the arduino version the PWM appears on arduino pin 3, and I used the LED on pin 13 at some point; these are PD3 and PB5 respectively.

from arduino-rtty.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.