Ok I've built my JackAl in such a way I cannot program the Teensy with it in place. Not enough room to plug a cable in. So I have to program it out of the JackAL board. I'm working out a workaround. However, in the meantime, how do delay the Touch calibration routine so that is doesn't execute upon completion of the load ? ?Insert a long enough DELAY so I have time to turn off the Teensy before it the routine executes?
Pete WK8S
|
Pete:
Perhaps I don't understand the question. However, setup() calls this code, which is at line 14 in EEPROMNew.cpp:
void ReadUserSettings() { ? int val; ? EEPROM.get(0, val);????? // Read first byte of EEPROM memory //val = 0;???????????????? // Uncomment this line forces a rewrite of EEPROM. Comment out line 23 to display ??????????????????????????????????????????????????????????? // is not changed. ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ? ? if (val != EEPROMINITVALUE) {???????????????????????????? // Already set or not? ??? GlobalDefaultEEPROMValues();??????????????????????????? // No, so set some common values ??? WriteEEPROMSettings(EEPROMDEFAULTOFFSET);?????????????? // Write default values to default block ??? WriteEEPROMSettings(EEPROMUSEROFFSET);????????????????? // Also assume defaults for user first time through ??? InitDisplayCalibration();?????????????????????????????? // Now have them calibrate display ? } ? ReadEEPROMSettings(EEPROMUSEROFFSET); }
The second lines causes a read of the first EEPROM byte and save that value in val. If val is not equal to EEPROMINITVALUE, which is 150, then the code sets a bunch of default values for variables. (If you uncomment the line immediately below the EEPROM.get() call, it will force the if statement block to execute.) The second statement in the if block writes those default values to one segment of EEPROM reserved for default values. I did this so you can always return to a default set of values. (This is what the Restore button you see in the lower right of the main program screen does when you press it.) Those same set of values are then also written into the EEPROM segment set aside for your own custom settings for those variables. As a result, EEPROM maintains a default set of values and a separate set that is whatever you have made them.
The last function call in the if statement block (i.e., InitDisplayCalibration()) is the routine that allows you to calibrate your display. If you place this statement:
MyDelay(10000UL);
immediately before InitDisplayCalibration(), you will have 10 seconds to turn off your rig. (Note: there is a standard Delay() function provided by the standard library, but it is a "blocking" function. That is, it blocks any interrupts that might occur while processing its delay. I wrote MyDelay() as a replacement because it does not block interrupts. So, if you plan to do any code that needs a program delay, you most likely will want to use MyDelay() instead of the stock Delay().)
Anyway, I'm not sure I answered your question, but perhaps this info will help you do what you need to do.
Jack, W8TEE
On Saturday, January 26, 2019, 6:42:18 PM EST, PeteWK8S via Groups.Io <pmeier@...> wrote:
Ok I've built my JackAl in such a way I cannot program the Teensy with it in place. Not enough room to plug a cable in. So I have to program it out of the JackAL board. I'm working out a workaround. However, in the meantime, how do delay the Touch calibration routine so that is doesn't execute upon completion of the load ? ?Insert a long enough DELAY so I have time to turn off the Teensy before it the routine executes?
Pete WK8S
|
Thanks Jack, you did answer it. At the moment I must program my Teensy on a breadboard then put it into the JackAl board because there isn’t room on the JackAl bd. to plug a USB. The heatsink interferes.? The delay will be a viable workaround.?
toggle quoted message
Show quoted text
On Jan 26, 2019, at 10:24 PM, jjpurdum via Groups.Io < jjpurdum@...> wrote:
Pete:
Perhaps I don't understand the question. However, setup() calls this code, which is at line 14 in EEPROMNew.cpp:
void ReadUserSettings() { ? int val; ? EEPROM.get(0, val);????? // Read first byte of EEPROM memory //val = 0;???????????????? // Uncomment this line forces a rewrite of EEPROM. Comment out line 23 to display ??????????????????????????????????????????????????????????? // is not changed. ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ? ? if (val != EEPROMINITVALUE) {???????????????????????????? // Already set or not? ??? GlobalDefaultEEPROMValues();??????????????????????????? // No, so set some common values ??? WriteEEPROMSettings(EEPROMDEFAULTOFFSET);?????????????? // Write default values to default block ??? WriteEEPROMSettings(EEPROMUSEROFFSET);????????????????? // Also assume defaults for user first time through ??? InitDisplayCalibration();?????????????????????????????? // Now have them calibrate display ? } ? ReadEEPROMSettings(EEPROMUSEROFFSET); }
The second lines causes a read of the first EEPROM byte and save that value in val. If val is not equal to EEPROMINITVALUE, which is 150, then the code sets a bunch of default values for variables. (If you uncomment the line immediately below the EEPROM.get() call, it will force the if statement block to execute.) The second statement in the if block writes those default values to one segment of EEPROM reserved for default values. I did this so you can always return to a default set of values. (This is what the Restore button you see in the lower right of the main program screen does when you press it.) Those same set of values are then also written into the EEPROM segment set aside for your own custom settings for those variables. As a result, EEPROM maintains a default set of values and a separate set that is whatever you have made them.
The last function call in the if statement block (i.e., InitDisplayCalibration()) is the routine that allows you to calibrate your display. If you place this statement:
MyDelay(10000UL);
immediately before InitDisplayCalibration(), you will have 10 seconds to turn off your rig. (Note: there is a standard Delay() function provided by the standard library, but it is a "blocking" function. That is, it blocks any interrupts that might occur while processing its delay. I wrote MyDelay() as a replacement because it does not block interrupts. So, if you plan to do any code that needs a program delay, you most likely will want to use MyDelay() instead of the stock Delay().)
Anyway, I'm not sure I answered your question, but perhaps this info will help you do what you need to do.
Jack, W8TEE
On Saturday, January 26, 2019, 6:42:18 PM EST, PeteWK8S via Groups.Io < pmeier@...> wrote:
Ok I've built my JackAl in such a way I cannot program the Teensy with it in place. Not enough room to plug a cable in. So I have to program it out of the JackAL board. I'm working out a workaround. However, in the meantime, how do delay the Touch calibration routine so that is doesn't execute upon completion of the load ? ?Insert a long enough DELAY so I have time to turn off the Teensy before it the routine executes?
Pete WK8S
|
Had the same problem but these 90 deg adapters from
Amazon?took care of it. If you have room you can also raise the 5V
regulator a little and bend it down towards the board.
?
Rick KN4AIE
?
?
?
toggle quoted message
Show quoted text
Thanks Jack, you did answer it. At the moment I must program my
Teensy on a breadboard then put it into the JackAl board because there isn’t
room on the JackAl bd. to plug a USB. The heatsink interferes.?
The delay will be a viable workaround.?
Thanks,
On Jan 26, 2019, at 10:24 PM, jjpurdum via Groups.Io < jjpurdum@...>
wrote:
Pete:
Perhaps I don't understand the question. However, setup() calls
this code, which is at line 14 in EEPROMNew.cpp:
void
ReadUserSettings() { ? int val; ? EEPROM.get(0,
val);????? // Read first byte of EEPROM
memory //val =
0;????????????????
// Uncomment this line forces a rewrite of EEPROM. Comment out line 23 to
display ???????????????????????????????????????????????????????????
// is not
changed. ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
? ? if (val != EEPROMINITVALUE)
{????????????????????????????
// Already set or not? ???
GlobalDefaultEEPROMValues();???????????????????????????
// No, so set some common values ???
WriteEEPROMSettings(EEPROMDEFAULTOFFSET);??????????????
// Write default values to default block ???
WriteEEPROMSettings(EEPROMUSEROFFSET);?????????????????
// Also assume defaults for user first time through ???
InitDisplayCalibration();??????????????????????????????
// Now have them calibrate display ? } ?
ReadEEPROMSettings(EEPROMUSEROFFSET); }
The second lines causes a read of the first EEPROM byte and save
that value in val. If val is not equal to EEPROMINITVALUE, which
is 150, then the code sets a bunch of default values for variables. (If you
uncomment the line immediately below the EEPROM.get() call, it will
force the if statement block to execute.) The second statement in
the if block writes those default values to one segment of EEPROM
reserved for default values. I did this so you can always return to a default
set of values. (This is what the Restore button you see in the lower right of
the main program screen does when you press it.) Those same set of values are
then also written into the EEPROM segment set aside for your own custom
settings for those variables. As a result, EEPROM maintains a default set of
values and a separate set that is whatever you have made them.
The last function call in the if statement block (i.e.,
InitDisplayCalibration()) is the routine that allows you to calibrate
your display. If you place this statement:
MyDelay(10000UL);
immediately before
InitDisplayCalibration(), you will have 10
seconds to turn off your rig. (Note: there is a standard Delay()
function provided by the standard library, but it is a "blocking"
function. That is, it blocks any interrupts that might occur while processing
its delay. I wrote MyDelay() as a replacement because it does not block
interrupts. So, if you plan to do any code that needs a program delay, you
most likely will want to use MyDelay() instead of the stock
Delay().)
Anyway, I'm not sure I answered your question, but perhaps this
info will help you do what you need to do.
Jack, W8TEE
On Saturday, January 26, 2019, 6:42:18 PM EST, PeteWK8S via Groups.Io
< pmeier@...>
wrote:
Ok I've built my JackAl in such a way I cannot program the Teensy with it
in place. Not enough room to plug a cable in. So I have to program it out of
the JackAL board. I'm working out a workaround. However, in the meantime, how
do delay the Touch calibration routine so that is doesn't execute upon
completion of the load ? ?Insert a long enough DELAY so I have time to
turn off the Teensy before it the routine executes?
Pete WK8S
|
We actually bring the USB cable out to the back panel using a panel-mount USB extender cable:
 This allows us to modify the code without having to open the case.
Jack, W8TEE
On Sunday, January 27, 2019, 9:50:45 AM EST, Rick Price <rickprice48@...> wrote:
Had the same problem but these 90 deg adapters from
Amazon?took care of it. If you have room you can also raise the 5V
regulator a little and bend it down towards the board.
?
Rick KN4AIE
?
?
?
toggle quoted message
Show quoted text
Thanks Jack, you did answer it. At the moment I must program my
Teensy on a breadboard then put it into the JackAl board because there isn’t
room on the JackAl bd. to plug a USB. The heatsink interferes.?
The delay will be a viable workaround.?
Thanks,
On Jan 26, 2019, at 10:24 PM, jjpurdum via Groups.Io < jjpurdum@...>
wrote:
Pete:
Perhaps I don't understand the question. However, setup() calls
this code, which is at line 14 in EEPROMNew.cpp:
void
ReadUserSettings() { ? int val; ? EEPROM.get(0,
val);????? // Read first byte of EEPROM
memory //val =
0;????????????????
// Uncomment this line forces a rewrite of EEPROM. Comment out line 23 to
display ???????????????????????????????????????????????????????????
// is not
changed. ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
? ? if (val != EEPROMINITVALUE)
{????????????????????????????
// Already set or not? ???
GlobalDefaultEEPROMValues();???????????????????????????
// No, so set some common values ???
WriteEEPROMSettings(EEPROMDEFAULTOFFSET);??????????????
// Write default values to default block ???
WriteEEPROMSettings(EEPROMUSEROFFSET);?????????????????
// Also assume defaults for user first time through ???
InitDisplayCalibration();??????????????????????????????
// Now have them calibrate display ? } ?
ReadEEPROMSettings(EEPROMUSEROFFSET); }
The second lines causes a read of the first EEPROM byte and save
that value in val. If val is not equal to EEPROMINITVALUE, which
is 150, then the code sets a bunch of default values for variables. (If you
uncomment the line immediately below the EEPROM.get() call, it will
force the if statement block to execute.) The second statement in
the if block writes those default values to one segment of EEPROM
reserved for default values. I did this so you can always return to a default
set of values. (This is what the Restore button you see in the lower right of
the main program screen does when you press it.) Those same set of values are
then also written into the EEPROM segment set aside for your own custom
settings for those variables. As a result, EEPROM maintains a default set of
values and a separate set that is whatever you have made them.
The last function call in the if statement block (i.e.,
InitDisplayCalibration()) is the routine that allows you to calibrate
your display. If you place this statement:
MyDelay(10000UL);
immediately before
InitDisplayCalibration(), you will have 10
seconds to turn off your rig. (Note: there is a standard Delay()
function provided by the standard library, but it is a "blocking"
function. That is, it blocks any interrupts that might occur while processing
its delay. I wrote MyDelay() as a replacement because it does not block
interrupts. So, if you plan to do any code that needs a program delay, you
most likely will want to use MyDelay() instead of the stock
Delay().)
Anyway, I'm not sure I answered your question, but perhaps this
info will help you do what you need to do.
Jack, W8TEE
On Saturday, January 26, 2019, 6:42:18 PM EST, PeteWK8S via Groups.Io
< pmeier@...>
wrote:
Ok I've built my JackAl in such a way I cannot program the Teensy with it
in place. Not enough room to plug a cable in. So I have to program it out of
the JackAL board. I'm working out a workaround. However, in the meantime, how
do delay the Touch calibration routine so that is doesn't execute upon
completion of the load ? ?Insert a long enough DELAY so I have time to
turn off the Teensy before it the routine executes?
Pete WK8S
|
Get directly from PJRC:
Dave - AI6K
|
Not a bad price, either, plus you're assured of getting the right USB connector.
Jack, W8TEE
On Sunday, January 27, 2019, 10:34:14 AM EST, David Berkompas <david.berkompas@...> wrote:
Get directly from PJRC:
Dave - AI6K
|
I finally got the Touch calibrate routine to run but it never ends! ?It’ll go around about 10 times then give “Point Ignored” at random spots and continues forever. Never exits. if I power down it just return to calibrate routine.
Please advise
Pete WK8S On Jan 28, 2019, at 8:00 AM, jjpurdum via Groups.Io < jjpurdum@...> wrote:
Not a bad price, either, plus you're assured of getting the right USB connector.
Jack, W8TEE
Get directly from PJRC:
Dave - AI6K
Pete Meier pmeier at Amateur Radio Callsign: WK8S || I never lose. If I don't win, I learn. -?unknown author ||
|
Pete:
As we speak, we are redoing the calibrate instructions. We originally had you "walk around the display" as you did, then write down the coordinate values, and then write them to EEPROM. That was a quikc-and-dirty we did early in the development phase. We are now rewriting that code so you don't have to record/write it to EEPROM. That should be posted by tomorrow. I'll send out a notice when the software and a doc file are ready.
Jack, W8TEE
On Monday, January 28, 2019, 11:26:17 AM EST, PeteWK8S via Groups.Io <pmeier@...> wrote:
I finally got the Touch calibrate routine to run but it never ends! ?It’ll go around about 10 times then give “Point Ignored” at random spots and continues forever. Never exits. if I power down it just return to calibrate routine.
Please advise
Pete WK8S On Jan 28, 2019, at 8:00 AM, jjpurdum via Groups.Io < jjpurdum@...> wrote:
Not a bad price, either, plus you're assured of getting the right USB connector.
Jack, W8TEE
Get directly from PJRC:
Dave - AI6K
Pete Meier pmeier at Amateur Radio Callsign: WK8S || I never lose. If I don't win, I learn. -?unknown author ||
|
toggle quoted message
Show quoted text
On Jan 28, 2019, at 1:11 PM, jjpurdum via Groups.Io < jjpurdum@...> wrote:
Pete:
As we speak, we are redoing the calibrate instructions. We originally had you "walk around the display" as you did, then write down the coordinate values, and then write them to EEPROM. That was a quikc-and-dirty we did early in the development phase. We are now rewriting that code so you don't have to record/write it to EEPROM. That should be posted by tomorrow. I'll send out a notice when the software and a doc file are ready.
Jack, W8TEE
On Monday, January 28, 2019, 11:26:17 AM EST, PeteWK8S via Groups.Io < pmeier@...> wrote:
I finally got the Touch calibrate routine to run but it never ends! ?It’ll go around about 10 times then give “Point Ignored” at random spots and continues forever. Never exits. if I power down it just return to calibrate routine.
Please advise
Pete WK8S On Jan 28, 2019, at 8:00 AM, jjpurdum via Groups.Io < jjpurdum@...> wrote:
Not a bad price, either, plus you're assured of getting the right USB connector.
Jack, W8TEE
Get directly from PJRC:
Dave - AI6K
Pete Meier pmeier at Amateur Radio Callsign: WK8S || I never lose. If I don't win, I learn. -?unknown author ||
|