Go Down

Topic: PPM Tester compile errors. (Read 169 times) previous topic - next topic

bluejets

Jun 17, 2019, 11:37 am Last Edit: Jun 17, 2019, 11:50 am by bluejets
Downloaded a program for the Attiny85 to test PPM signals but it comes up with a host of compile errrors.

Web site is here .........

http://mode-zero.uk/viewtopic.php?f=41&t=479&sid=c0478dd3421dc0b6219d654666e17975

Tried to include the code and the error messages but the preview said I had exceeded the max 9000 characters.

I realise it is a big ask but I do not know how to get around the excess code and error message problem.

error messages were all around a similar theme of "whatever" not declared in this scope.

"whatever" included PORT_USI, PIN_USI_SDA, PIN_USI_SCL and others...all relating to USI_TWI_MASTER

I made sure I had that latest library installed but it made no difference.






pert

If the error text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Which hardware core are you using to add support for the ATtiny85 to the Arduino IDE (e.g., ATTinyCore, damellis/attiny)?

bluejets

#2
Jun 17, 2019, 12:40 pm Last Edit: Jun 17, 2019, 12:42 pm by bluejets
If the error text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Which hardware core are you using to add support for the ATtiny85 to the Arduino IDE (e.g., ATTinyCore, damellis/attiny)?
Ah, yes....sorted. Well kind of.
Still had the board set at promini from a previous job i was working with earlier. :-[

Another error popped up relating to digispark 16.5mz.
I did notice in the video he was using a stand alone chip but no idea what this means in his notes at the top of the program

" use the ATtiny85 capable of running at 20MHz (20PU).  Burn bootloader to operate on internal clock at 16 MHz"

I am currently trying to use one of the Digispark clone modules.

pert

" use the ATtiny85 capable of running at 20MHz (20PU).  Burn bootloader to operate on internal clock at 16 MHz"
I know how to do this using ATTinyCore but I don't have any experience with Digispark. There are some ATtiny experts here who should be able to chime in with the information you need.

bluejets

#4
Jun 17, 2019, 01:37 pm Last Edit: Jun 17, 2019, 01:55 pm by bluejets
I know how to do this using ATTinyCore but I don't have any experience with Digispark. There are some ATtiny experts here who should be able to chime in with the information you need.
Downloaded the ATTinyCore and placed in the hardware folder.

Selected the ATTinyCore list of boards and clicked on the ATTiny25/45/85 and it compiles fine now.
Thanks for that info.

So getting it to work on one of the digispark modules might be a no-go then...??

Edit:- also found how to mod to make the chip run at 16Mhz internal.

https://www.hackster.io/porrey/attiny-16mhz-610d41


pert

Edit:- also found how to mod to make the chip run at 16Mhz internal.

https://www.hackster.io/porrey/attiny-16mhz-610d41
None of that is necessary. ATTinyCore has that all done for you. You can just select Tools > Board > ATtiny25/45/85, Tools > Clock > 16 MHz (PLL) and then do a Burn Bootloader.

But you might not even need to do that. Some of the Digispark boards come running at 16 MHz. What do you select from the Tools > Board menu normally when you are using your Digispark?

bluejets

#6
Jun 17, 2019, 04:00 pm Last Edit: Jun 17, 2019, 04:06 pm by bluejets
None of that is necessary. ATTinyCore has that all done for you. You can just select Tools > Board > ATtiny25/45/85, Tools > Clock > 16 MHz (PLL) and then do a Burn Bootloader.

But you might not even need to do that. Some of the Digispark boards come running at 16 MHz. What do you select from the Tools > Board menu normally when you are using your Digispark?
Digispark(Default-16.5mhz )

Comes up with errors on compile though.

Code: [Select]

Arduino: 1.8.9 (Windows 7), Board: "Digispark (Default - 16.5mhz)"

Sketch uses 7136 bytes (118%) of program storage space. Maximum is 6012 bytes.
Global variables use 206 bytes of dynamic memory.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Digispark (Default - 16.5mhz).

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



I might bite the bullet and get a few of the bare chips rather than the modules and program them with a UNO using the Attiny 25/45/85 ...selecting the 85 then "internal 16mhz like you say.
Seems to compile ok like that....thanks again, much appreciated.

bluejets

I know how to do this using ATTinyCore but I don't have any experience with Digispark. There are some ATtiny experts here who should be able to chime in with the information you need.
Managed to get a message to the original author who has a couple of pointers.
Once I chase that up and understand/ try that, I'll post back updates for future reference.
Cheers, thanks once again.... :)

bluejets

#8
Jun 19, 2019, 01:06 pm Last Edit: Jun 19, 2019, 02:24 pm by bluejets
Between help from here, and the original author and quite a bit of trial and error, making up an adaptor board from the link below, I finally managed to get this up and running.
Link for adaptor board.

http://mode-zero.uk/viewtopic.php?f=41&t=60&p=5769#p5769

Used a USBasp programmer as shown in the link and although I had initial problems, it all worked in the end.
Settings for the Arduino  IDE were .......

Under Tools(Board type ATTiny Microcontroller) select..... ATTiny 25/45/85
and then again under tools select .....ATTiny85
again under Tools select ......... 8mhz internal

When uploading use the Sketch....Upload Using Programmer option .... NOT the normal upload button.
When finished uploading there appears 2 errors (one below the other) saying ...

avrdude:  warning : cannot set sck period. please check for usbasp firmware update.

However, with both this sketch for the PPM Tester and a modified BLINK sketch (to work on pin 1 in place of onBoardLed) everything is now working.

Someone may know where the problems originated but for me they seem to have inexplicably vanished.

EDIT:- Apparently the so called error is just a warning and the reasons are wide and varied so still looking as to why.

Managed to find that by originally using Zadig 2.4 and changing the usbasp driver to libusbK was one issue that made the programming possible, even with the final warnings.

Go Up