Keyboard Shortcuts
Likes
- HBTE
- Messages
Search
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
And the not so great photo of my setup is in the group Photos section: |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
I already posted it.. but I can't find it either.? Erik kind of hid it in the code? ;-)
const int SI_nSEL[4] = {6,7,0,0};? //gaw changed??? 2? LEVEL SHIFTERs const int SI_SCLK = 10 ;??? // gaw changed from 1 ;? LEVEL SHIFTER const int SI_SDI = 11 ;??? // gaw changed from 2 ;??? LEVEL SHIFTER const int SI_SDO = 12;??? // gaw changed from 3 ;????? DIRECT CONNECTION, No level shifter //Parallel mode bit 0 pin number, according below line the PE4302 is connected to lines A0,A1,A2,A3,A4,A5 #define PE4302_pinbase A0????? //ALL USE Red LEDS to drop voltage for the 3.3V PE4302 #define DB_16?? A5? //V6 #define DB_8??? A4? //V5 #define DB_4??? A3? //V4 #define DB_2??? A2? //V3 #define DB_1??? A1? //V2 #define DB_0_5? A0? //V1 73, Gary WB6OGD |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
Pin numbers you should be able to figure out from the code from any instance of "pinMode()".
toggle quoted message
Show quoted text
For example, in Erik's original code: ################### const int SI_nSEL[4] = { 0,5, 11, 12 }; // #4 is dummy!!!!!!
const int SI_SCLK = 1 ;
const int SI_SDI = 2 ;
const int SI_SDO = 3 ;
const int SI_GPIO = 4 ;
....
? pinMode(SI_nSEL[0], OUTPUT);
? pinMode(SI_nSEL[1], OUTPUT);
? pinMode(SI_SCLK, OUTPUT);
? pinMode(SI_SDI,? OUTPUT);
? pinMode(SI_SDO,? INPUT_PULLUP);
? pinMode(SI_GPIO, INPUT_PULLUP);
####################################
Digital pins can be referred to by either an integer such as "5", or by a name such as "D5". So for Erik's code, SCLK is pin 1 on your Nano board, labeled D1 on your board. And nSEL[0] is pin D0, nSEL[1] is pin D5.? ?(The remaining pins in nSEL[] are never used by Erik) The analog pins "A0" through "A7" on the Nano are accessible from the 10 bit A2D converter, though pins "A0" through "A5" can also be used as digital pins.? But not "A6" or "A7" which are strictly analog inputs. Jerry On Sun, Feb 16, 2020 at 06:39 AM, Marty Wittrock wrote:
Can you share your wiring scheme with me so I know what pins do what on the Nano? I know you did a slightly different way to make it a lot easier to hook up but I'm not sure I ran across that in all the threads - so when you have a chance today please share that with me. |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
Gary,
After a little bit of cockpit errors (mostly selecting the right board support package and getting the Nano programmed) I got the Nano set up. In my case I had to use the following settings to get things working (see screenshot attached to this message). I also had to select just 'Upload' because upload with programmer must mean that I'm using an external programmer instead of the onboard USB. One more, I made sure I'm using the Chinese CH341SER.exe to load the COM driver - at one point that was an issue (I thought) and I used ZADIG to reprogram to another driver...THAT was not the way to go.? So I have the Nano loaded and it's ready to play. This afternoon I'll build the filter and the adapter card that will hold the Receive and LO boards so I can just plug them into my setup. I also have to build the filter assembly and get that completed, too. I may set my Nano up for 3.3V first by doing the regulator exchange and cut the required traces, too. More on that as I have it. Can you share your wiring scheme with me so I know what pins do what on the Nano? I know you did a slightly different way to make it a lot easier to hook up but I'm not sure I ran across that in all the threads - so when you have a chance today please share that with me. More to follow - stay tuned... 73 de Marty, KN0CK |
Re: TinySA.ino GUI testing
#tinysa
On Sun, Feb 16, 2020 at 02:16 AM, Jerry Ponko AC9NM wrote:
ESP32 & 2.4" touchscreen (320x240) SPI displayGlenn (VK3PE) and I have been cogitating building the SA using an ESP32. I might suggest?for that processor, try the for the ILI9341 display. It supports both the display and touch screen. I haven't tried the?touch screen capability yet, but we used that library in the we recently completed and the display part works great. The library also supports a number of other display types and can be used on the ESP32, the ESP8266 and STM32. EDIT: The Arduino IDE can handle using both cores on the ESP32. Look at the code for the above mentioned VFO project to see how that works. In that software, one core handles updating the display and the other does most of the other work. ? -- John P. WA2FZW |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
Gary,
WOW..! Thank you posting that sketch..! This will give me the ability to construct and test my hardware until I can use the 'Blue Pill' board to add a local display. What I've come to learn on this project is that it's not as 'prefab' as I first thought - which is fine. I wasn't aware that the original codebase was tailored for a Protoneer board - I learned that from Jerry last night. I also learned that once I got a clean complie once all the resources were present it would outstrip the memory capabilities of the Nano by a long way. So the upshot to all this is I got a wonderful education on the codebase and boards it's likely to work with depending on what display and other resources are present...All that is great stuff..! So I am going to install the code you uploaded and get my setup running today so the hardware part is done and known working with the PC program - your upload will REALLY help me get things developed today. I greatly appreciate you doing that, otherwise I'd be tearing out the display and rotary control code myself and have that complication slow me down from building hardware. I will do the 3.3V Nano trick today to see how it'll play with the hardware - not having the ILI9341 display to contend with will REALLY help with the hardware build checkout. MANY THANKS for the upload, Gary - more as I have it later today... 73 de Marty, KN0CK? |
TinySA.ino GUI testing
#tinysa
Jerry Ponko AC9NM
Since I haven't gotten all my hardware to build Erik's TinySA, I thought I'd start testing the GUI/touchscreen with different MCUs and Touchscreens to make a stand-alone SA using the Arduino IDE.
ESP32 & 2.4" touchscreen (320x240) SPI display Yesterday I tried using a DOIT ESP32 DevkitV1 and the standard ILI9341 2.4" touchscreen. The display works fine but the touchscreen library, XPT2046_TouchScreen, needs to be modified: The touchscreen y-coordinate is reversed in when display is in landscape mode. The solution is to add another case to void XPT2046_Touchscreen::update() in XPT2046_Touchscreen.cpp atter line 170 such as: case 3: xraw = x; yraw = 4095 - y; break; And then modify XPT2046_Touchscreen.h line 53 to be: void setRotation(uint8_t n) { rotation = n % 5; } -------- I filed this as a bug report with the author, Paul Stroffregen, on Github but I don't know if or when he'll make the changes. From looking at the Espressif esp32 forum, it looks like nobody thinks this driver works with the esp32. I would expect other esp32 variants to also work such as the esp32S as long as they have enough GPIO pins. The program storage and SRAM usage is less than 15%. As a plus, the esp32 has two cores @240MHz clock and you should be able to disable the wifi/bluetooth to cut down on the noise generated buy these components. I know you can run threads tied to a specific core with the esp-idf but I doubt the Arduino IDE will have any support for this feature. Arduino Mega2560 and 3.95" (480x320) ST7796S touchscreen shield (photo attached) What's nice about this display is its size and that it's a shield that plugs directly into a Arduino Mega2560 or standard UNO R3 board. It's a 8-bit parallel display with a SD card slot so using it on a MCU witch doesn't have enough GPIO for all your devices will be a problem. The Mega2560 while bigger than an UNO has a lot more memory than a Nano and lots more GPIO. Even so, the TinySA.ino sketch uses about 18% of storage and 77% of SRAM so it's still a tight fit. (In reality, 100% usage is the goal but not practical). The graphics uses the MCUFRIEND_kbv and Adafruit_GFX libraries so not much was changed since functionally it's the same as the ILI9341 driver. The touchscreen library, TouchScreen, which is based on the Adafruit_TouchScreen library, on the otherhand, isn't working properly yet. It's a four wire touchscreen. There's a Mini Mega out there that's much smaller but for a 16MHz MCU it seems a bit pricey ($7-$12). Arduino Mega2560 and 2.4" SPI display Not tested but I will give it a try after I finish testing with the 3.95" touchscreen. ESP8266 and 2.4" SPI touchscreen display Works fine, plenty of memory, speed but not enough GPIO pins left any else.. STM32 Maple leaf Still waiting for them to arrive. But I suspect it has enough memory to do the job. I haven't tried to compile it in the Arduino IDE to see what libraries will be rejected, etc. My first choice would have been an Arduino Pro Mini for the MCU because it doesn't have USB or Wifi which can generate noise but the memory is just too limited. My next choice would have been an esp8266. They're inexpensive but don't have enough I/O. I do look forward to testing with the STM32 Maple Leaf. FYI: The serial command-line interface menu system continued to work in all cases. Jerry Ponko, AC9NM |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
I have posted my Nano version of Erik's code in folder WB6OGD.
The local display and encoder are turned off, you do all control with Erik's PC program. Erik set up his code so you only make minor edits like I have done. It only uses 41% of program memory, 49% of dynamic (variable) memory. Marty, try this on your Nano. 73, Gary WB6OGD |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
I believe those using a Nano had to strip out the display and encoder stuff.
toggle quoted message
Show quoted text
Yes, pins are very different between the Nano and the Blue Pill, but any digital GPIO pin should work. Search the code for "pinMode(", and assign reasonable pin numbers for your processor on all of them. The tinySA.ino code that Erik posted is for a Protoneer ARM board, different again. If you haven't programmed under Arduino much, perhaps start out by finding a blinky LED example program on the web and get it to work on both the Nano and the Blue Pill. Jerry On Sat, Feb 15, 2020 at 07:49 PM, Marty Wittrock wrote: What's rfeally odd about this is that the .ino file I'm using is the same one from the file area on this forum for the tinySA (tinySA.ino) and just by compiling it with the required display header file (Adafruit_1306.h) the sketch gets bloated enough that it can't even fit on a Nano - - yet others are using the same code and are able to load it on a Nano. So I wonder why I'm having the issue..? Guess I'll wait until morning to see if anyone else can shed some light on this.? |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
Jerry,
What's rfeally odd about this is that the .ino file I'm using is the same one from the file area on this forum for the tinySA (tinySA.ino) and just by compiling it with the required display header file (Adafruit_1306.h) the sketch gets bloated enough that it can't even fit on a Nano - - yet others are using the same code and are able to load it on a Nano. So I wonder why I'm having the issue..? Guess I'll wait until morning to see if anyone else can shed some light on this.? I took your suggestion and tried programming the 'Blue Pill' using my ST-Link V2. There's a compiler issue that appears to be tied to the pinout: Arduino: 1.8.10 (Windows 10), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STLink, 72Mhz (Normal), Smallest (default)"
?
tinySA:69:16: error: 'A4' was not declared in this scope
?
?#define TFT_CS A4
?
..... ...this also goes for the A5 and A3 pins, too. Apparently, the Nano uses those, but those pins may be different for the 'Blue Pill'...that's my only correlation on that (maybe). Joreg has compiled the code for the 'Blue Pill' board and has he local display working - I recalled that he mentioned there could be pinout differences between the Nano and 'Blue Pill'. Again, guess I'll see what your opinion is along with any others on this...Not making the headway I thought I'd have today getting a board ready for the rest of the hardware... :-/ 73 de Marty, KN0CK |
Re: tinySA.ino for Nano compiles fine, but is 'too large' to upload...
Using up all but 74 bytes on a Nano for global variables is a very bad idea.
toggle quoted message
Show quoted text
You will almost certainly run out of RAM, given all the C++ cruftiness out in the Arduino libraries. Your only clue will be that your program doesn't work. If you can't get the ifdef's to behave so it fits in the Nano, concentrate on the Blue Pill. Should be able to use that ST-Link to load your program, no need to get that USB driver working. Here are some old notes I made in 2018, trying to remember something I had done in 2017. ? ??/g/BITX20/message/50141 Jerry, KE7ER On Sat, Feb 15, 2020 at 05:59 PM, Marty Wittrock wrote:
Well...Since I am having no luck getting the Windows drivers working with my 'Blue Pill' board, I switched over to the Nano and attempted to compile and upload the tinySA.ino sketch into my Nano (prior to doing the hardware fix for 3.3V). Compiles fine when I installed the Adafruit_1306 libraries and the header file (Adafruit_1306.h) into the project. Compiles clean, but it won't upload to my Nano because it says the following: |
Re: my schematic diagram
You want suggestions?
toggle quoted message
Show quoted text
Here's one: ? ??/g/QRPLabs/topic/69666632#42281 Many of these parts are quite small, I'd be hard pressed to get by without good optics. Otherwise, tough to know if you have shorts or cold solder joints or solder whiskers messing it up. Though it is possible with young eyes and maybe a bit of myopia. Another thing you need is a good temperature controlled soldering iron with a very fine tip.? Preferably two, so you can easily remove C's and R's. The solder I use on 0603 parts is 0.40 mm in diameter, the 63/37 tin+lead stuff. Lead-free solder melts at a significantly higher temperature and so is harder to work with. Unless you are stamping out thousands of boards, there's not much lead involved here.? ? But don't hold the solder with your mouth when needing a third hand like I do. Anyways, 10 for $7 is a very good price! Datasheet looks reasonable. Be sure to follow the datasheet for matching your?particular SAW filter to 50 ohms, not Erik's instructions on how to use his SAW filter. Jerry, KE7ER On Sat, Feb 15, 2020 at 04:45 PM, jafinch78 . wrote: Any thoughts, questions, comments and/or suggestions regarding this model filter? |
tinySA.ino for Nano compiles fine, but is 'too large' to upload...
Well...Since I am having no luck getting the Windows drivers working with my 'Blue Pill' board, I switched over to the Nano and attempted to compile and upload the tinySA.ino sketch into my Nano (prior to doing the hardware fix for 3.3V). Compiles fine when I installed the Adafruit_1306 libraries and the header file (Adafruit_1306.h) into the project. Compiles clean, but it won't upload to my Nano because it says the following:
Arduino: 1.8.10 (Windows 10), Board: "Arduino Nano, ATmega328P"
?
Sketch uses 31462 bytes (102%) of program storage space. Maximum is 30720 bytes.
?
Global variables use 1974 bytes (96%) of dynamic memory, leaving 74 bytes for local variables. Maximum is 2048 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Arduino Nano.
?
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
...And I have tried other Nano variants of the board support package (ATMega328P (Old Bootloader)) with similar results - can't upload. So I tried commenting out the display in the following line: // #define USE_DISPLAY 1 ...and it gives me a compiler error later in the compile that I don't think I should have to fix.? Is there a way to get this compiled so it'll make the upload happy? Is there a variant to the code that everyone else is using with their Nanos that will compile better than what I thought? Until I can get the 'Blue Pill' issue fixed, I would like to get the Nano going around the hardware and then use the PC Windows program to play with the tinySA just to get 'stick time'...But so far the stick is beating me to a pulp with getting either the Nano or the 'Blue Pill' going... :=/ Any help with this will be GREATLY appreciated - let me know where I'm going wrong... 73 de Marty, KN0CK |
Re: Hit a wall in compile...What am I doing wrong..?
Joerg,
I was able to use my ST-LINK V2 programmer to get the 'generic_boot20_pc13.bin' into the 'Blue Pill' board - that went fine. However, I'm stuck with the Windows drivers for the USB port. I did a search for how to load those drivers and I came to a procedure that installed the USB and Serial drivers for the 'Blue Pill' (wdi-simple.exe) but my board is still not recognized with a COM port - it shows up as an unrecognized USB device. In the meantime, I did load the correct board support packages for the Generic STM32F103 series and that installed fine, too, So I'm stuck at that place where I cannot get a COM port for the 'Blue Pill' board when I try to use the USB on the 'Blue Pill' board. However, I read that I can use the ST Link to upload my sketch to the 'Blue Pill' board directly, so maybe that's the best alternative for now. If you have your code in the form of a .bin file (or even if it's the .ino file format) I will try uploading it to my 'Blue Pill' board that way. At the same time, please let me know what I/Os you're using for your project so I know how the hardware will hook up to the 'Blue Pill' board. Keep me advised, Joerg - thanks..! 73 de Marty, KN0CK |
Re: my schematic diagram
On Sat, Feb 15, 2020 at 04:05 PM, Glenn wrote:
the specified filter appears to be obsolete and hard to get in VK at least. I wound up ordering these: ?(the seller kindly added the matching network performance data in an image also with an image of the module he tested also of the single filter design) ?(decided to go with the dual since can jumper with a 0 ohm resistor to study effect of using one SAW filter and maybe other matching network or filter design) ?(will have way more than I'll ever use, so for postage and maybe one dollar I can send anyone who needs some) ?(mdflyelectronics sold out after I ordered, so was cancelled regarding the 52 values 1300 pieces kit, so found this one since I don't have any inductors and have resistor and capacitor 0603 kits) also sells single SAW Filter PCB's and cases as well as other parts too.? Any thoughts, questions, comments and/or suggestions regarding this model filter? |
Re: my schematic diagram
1st post,??? the specified filter appears to be obsolete and hard to get in VK at least.
I found this part at RS-components.com? "RF3446E"??? BW appears to be just whats needed. Approx 1MHz.? Impedance easily catered for with L match. About US$2 Edit, Mouser have them also. glenn vk3pe |
Re: Hit a wall in compile...What am I doing wrong..?
Marty This might help: Arv _._ On Sat, Feb 15, 2020 at 12:18 PM Marty Wittrock <martywittrock@...> wrote: Joerg, |
Re: Hit a wall in compile...What am I doing wrong..?
Marty,
it is quite some time ago, that I bought my blue pills. But as far as I remember, they do NOT come with the Arduino bootloader. Initially you can only upload programs using either a separate USB-serial interface or an ST-LINK adapter. With those, you can flash the Arduino bootloader into it. You can find a description of that here?. BTW: I with my board no modifications of the USB interface were required. After that you can use this board setting in the IDE (you have to install support for those boards before): -- Joerg, ex-DB2OO |
Re: Hit a wall in compile...What am I doing wrong..?
Joerg,
While I'm at it, the Blue Pill board is programmable through the USB port to upload a sketch, isn't It? Mine is fresh from Amazon. In the IDE environment, which board settings do you use to upload the sketch? Let me know that, too. Many thanks in advance -? 73 de Marty, KN0CK |