Keyboard Shortcuts
Likes
Search
lcd 3.5 display help sought
I have been following PD8W (Willem) progress on his build out of a lcd display/si5351. His code and hardware are listed at PD8W.com. After some hard work I have the display working - and looks like his does on his web site. I am at the point where he is using momentary pushbuttons to cycle selections from the screen however am a bit lost as to how the buttons are actually wired up. I sent him a couple of requests for help but he must be out of town as I haven't gotten and feedback. Could someone take a look on his web page to see what I need to do? The sketch is also there and like I said it compiles. My first issue to overcome what understanding how to wire the lcd and found that in the mcufriend ino. Woohoo the display showed up on the lcd. Let me know if you need anything further. Note - I did hook it up to the bitx and the encoder does change freqs so that part is also working 73 Art |
G4NQX
Ooops should read pulldown as diagram. Most of the code at the moment is display stuff. The icon.h can be deleted I suspect as it was development penguin pic but i didn't spend time looking too hard at the code. It could do your head in ! Are you using this on the bitX as is, or are you building a featured multiband bitx. |
开云体育Rob Initially just the 40 m version. I am looking down the road to a multiband at some later date. Thanks for the info. Time to get my reference book out to review. So with the switch closed vcc is connected to the encoder or ? Art Sent from my iPhone On Feb 4, 2017, at 7:09 PM, G4NQX <tasmod@...> wrote:
|
toggle quoted message
Show quoted text
On Feb 4, 2017, at 7:24 PM, Art Olson via Groups.Io <olsonaj6927@...> wrote:
|
Jack Purdum
The four push buttons are used to control the frequency and its increment. One button allows you to move the cursor above the field that you wish to change. When you get it above the field that you wish to change, you push a button to set it to that field. The encoder can then be rotated to change the field. Truth is, that's a pretty clunky way to do it. In fact, the only reason is because that's the way the VFO code is set to work.? I use a process that I call Fast Tune. When you are just "tuning around", you rotate the encoder at a fairly slow rate and the frequency changes at a rate set at the current increment value. Let's assume it's 100Hz. If I tune slowly, like you do when you are zeroing in on a frequency, each detent of the encoder is +/- 100Hz, depending on CW (+) or CCW (-) rotation. But suppose you want to move from 7.280 to 7030 to listen to CW. In the video, you're going to have to do a bunch of button pushes to change it to a large increment (e.g., 10KHz) and then, when you get near the CW band, more button pushes to drop the increment back to 100Hz so you can zero in on the frequency you want. With Fast Tune, as soon as you start moving the encoder shaft rapidly (and you can define in software what "rapidly" is), the software senses the rate of turn on the encoder and immediately and automatically changes the increment to 10KHz (or whatever rate you have set in the code). Keep turning it quickly and the increment stays at 10KHz. However, as you approach your target frequency and you slow the turn rate down, the software senses that and drops the increment back to the "slow" rate of 100Hz (or whatever you have set it to). The default tune rate can even be changed at runtime via an encoder shaft press. No more press-a-button-move-to-the-digit-rate-button-press-rotate-the-encoder-to-the-frequency-button-press. Just move and go.? If I were you, I'd use Fast Tune in a heartbeat. The code for Fast Tune can be found in my article in the April issue of QRP Quarterly. Jack, W8TEE From: Art Olson via Groups.Io <olsonaj6927@...> To: [email protected] Sent: Saturday, February 4, 2017 5:23 PM Subject: [BITX20] lcd 3.5 display help sought I have been following PD8W (Willem) progress on his build out of a lcd display/si5351. His code and hardware are listed at PD8W.com. After some hard work I have the display working - and looks like his does on his web site. I am at the point where he is using momentary pushbuttons to cycle selections from the screen however am a bit lost as to how the buttons are actually wired up. I sent him a couple of requests for help but he must be out of town as I haven't gotten and feedback. Could someone take a look on his web page to see what I need to do? The sketch is also there and like I said it compiles. My first issue to overcome what understanding how to wire the lcd and found that in the mcufriend ino. Woohoo the display showed up on the lcd. Let me know if you need anything further. Note - I did hook it up to the bitx and the encoder does change freqs so that part is also working 73 Art |
toggle quoted message
Show quoted text
On Feb 4, 2017, at 10:27 PM, Jack Purdum via Groups.Io <econjack@...> wrote:
|
开云体育Sent from my iPhone 3.5. Ordered a 2.8 and should be here this week. 3.5 supports mcufriend. Initially ran examples to make sure it would work under mcufriend. Looked thru the sketches to see where to change the LCD model - no luck.? Art On Feb 5, 2017, at 7:48 AM, G4NQX <tasmod@...> wrote:
|
Jack Purdum
Some time ago I posted a photo of a 2.4" mcufriend tft display I hope to integrate into my rig. I have also tried it with the 3.5" display and it works fine, but is not scaled correctly. It would be a lot of work, but the code could be configured to auto-scale at runtime after reading the display ID.? Jack, W8TEE From: Art Olson via Groups.Io <olsonaj6927@...> To: [email protected] Sent: Sunday, February 5, 2017 9:36 AM Subject: Re: [BITX20] lcd 3.5 display help sought Sent from my iPhone 3.5. Ordered a 2.8 and should be here this week. 3.5 supports mcufriend. Initially ran examples to make sure it would work under mcufriend. Looked thru the sketches to see where to change the LCD model - no luck.? Art
|
Jack Purdum
Rob: Did you manage to shoehorn the display code into the Nano program space? Even though my code showes about 25% of SRAM still available, the code was "flaky". (I moved my code to the Mega 2560 Pro Mini.) I'm pretty sure I was trashing the heap space with changes in the amount of stack space as the program ran. I also see that you're managing the display with a keypad; that might help cut down the code size, as I'm using a state machine and a rotary encoder to do everything. Jack, W8TEE From: G4NQX <tasmod@...> To: [email protected] Sent: Sunday, February 5, 2017 7:48 AM Subject: Re: [BITX20] lcd 3.5 display help sought Art, Are you using 3.5 inch or 2.8 inch display. Code is written for 2.8 and will take some scaling to fit properly. I'm using a 3.5 inch mcufriend here on a twin signal generator project and it's 480 x 320. (Notoriously difficult to photo) -- Rob G4NQX |
G4NQX
Jack, No, whenever I use an 8 bit display I automatically use a Mega for the pins.? I've done all sorts of tricks before to use Nano or Uno even,? but it's not worth the hassle as they are cheap enough. Apart from my portable rigs I rarely try to shoehorn or miniaturise projects.? If I use smd for something they automatically become smaller anyway and in fact I like smd work. The signal generator project uses a Mega, a 3.5inch 8 bit mcufriend display, a 4x3 keypad for direct frequency entry to suit either of the modules, si5351 or ad9850(1) An ad8703 log amp as power out measurement. Future work is to add switched lpf's to cater for ham bands. (I've already done this on another project) Amp and output leveller for the ad9850. Then switched attenuators. Features as now are,? single frequency - frequency sweep between ranges - power out measurement - select either rf board - frequency limits to suit. I can send you the sketch if you want a look.
|
G4NQX
You probably won't like this but that code just isn't worth it, it's all about display.? You would be better deciding what you want and write your own or hack the display code about.??? Heck, use the Raduino code but rewrite for tft display, Trouble is display coding for a tft display is not trivial compared to an lcd, even at 20x4 line lcd, that's easy ! Use Jacks rotary speedup for just one band use along with a simpler uncluttered tft display.? I know the filter stuff etc looks nice but it's not relevant to a BitX. I can send you some code already done for tft's for you to look at and hack.? I use a 'basic' style of coding which is easy to read and follow. One tip I find helps whenever you get code to look at, is to first segment the functions with the single comment and hashes (pounds). i.e.?? //####################### That way you get a clear idea of program flow. Better stop now as I suppose this isn't relevant to BitX group. |
开云体育Rob I have come to the conclusion. Appreciate your wise council. I plan on looking at Jacks work and if you? Sent from my iPhone On Feb 5, 2017, at 11:11 AM, G4NQX <tasmod@...> wrote:
|
Rob
toggle quoted message
Show quoted text
Send me your code that would be great. You can email me at. olson339 at Comcast dot net Art Sent from my iPhone On Feb 5, 2017, at 11:33 AM, Art Olson <olsonaj6927@...> wrote: |
Jack Purdum
Sure! Sounds very neat! Any pictures? Jack, W8TEE From: G4NQX <tasmod@...> To: [email protected] Sent: Sunday, February 5, 2017 10:51 AM Subject: Re: [BITX20] lcd 3.5 display help sought Jack, No, whenever I use an 8 bit display I automatically use a Mega for the pins.? I've done all sorts of tricks before to use Nano or Uno even,? but it's not worth the hassle as they are cheap enough. Apart from my portable rigs I rarely try to shoehorn or miniaturise projects.? If I use smd for something they automatically become smaller anyway and in fact I like smd work. The signal generator project uses a Mega, a 3.5inch 8 bit mcufriend display, a 4x3 keypad for direct frequency entry to suit either of the modules, si5351 or ad9850(1) An ad8703 log amp as power out measurement. Future work is to add switched lpf's to cater for ham bands. (I've already done this on another project) Amp and output leveller for the ad9850. Then switched attenuators. Features as now are,? single frequency - frequency sweep between ranges - power out measurement - select either rf board - frequency limits to suit. I can send you the sketch if you want a look. -- Rob G4NQX |
Jack Purdum
No, I think anything that helps anyone read code is a good thing. To anyone who thinks otherwise, skip the rest of this post... When I had my software company, I strictly enforced a "function header rule" that had to be of the form: / ? ?Purpose: This function (whatever it does) ? ?Parameter list: ? ? ? int x ? ? ? ? ? ? ? ? ?the x coordinate for the display ? ? ? int y ? ? ? ? ? ? ? ? ? ? ? ?y ? ? ? ? ? ? ? ? ?" ? ?Return value: ? ? ? int flag ? ? ? ? ? ? ?1 on success, 0 on fail ? ?CAUTION: (used to inform of global data or coupling action with other function(s) / int MyDisplay(int x, int y) { ? ?// The rest of the function By using this format, I wrote a filter that would read all of the project's?source code files and, upon seeing "/" it knew a function header was coming up and the closing "/" marked the end of the header and the next line would contain the function signature. The filter used the FILE macro to define the name of the source file and LINE gave me the line number. I then sorted on function name and wrote the header, signature, file name, and line number to an ASCII file. Voila: Documentation for all functions used in the project.? Coding consistency makes it easier for a team to debug and maintain code. Any programmer who didn't do this had to buy beer and pizza for everyone on Friday for lunch. (The company was small.) It didn't take long for everyone to adopt the same style convention. Jack, W8TEE From: G4NQX <tasmod@...> To: [email protected] Sent: Sunday, February 5, 2017 11:11 AM Subject: Re: [BITX20] lcd 3.5 display help sought You probably won't like this but that code just isn't worth it, it's all about display.? You would be better deciding what you want and write your own or hack the display code about.??? Heck, use the Raduino code but rewrite for tft display, Trouble is display coding for a tft display is not trivial compared to an lcd, even at 20x4 line lcd, that's easy ! Use Jacks rotary speedup for just one band use along with a simpler uncluttered tft display.? I know the filter stuff etc looks nice but it's not relevant to a BitX. I can send you some code already done for tft's for you to look at and hack.? I use a 'basic' style of coding which is easy to read and follow. One tip I find helps whenever you get code to look at, is to first segment the functions with the single comment and hashes (pounds). i.e.?? //####################### That way you get a clear idea of program flow. Better stop now as I suppose this isn't relevant to BitX group.
-- Rob G4NQX |