Activity for Jeff Weinmann

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    No buttons in my application. The clock did come with a PCB board with 3 buttons, but I've decided to go buttonless. My clock application is centered around data from a GPS module and I harded coded EST daylight savings right into code as I can sense dates as well as times. ebay has a nice 1638 board to tinker with. I have to say my interest in this driver has greatly increased ! https://www.ebay.com/itm/155044572762?hash=item2419606e5a:g:jy0AAOSwMVhir-Cc&amdata=enc%3AAQAHAAAAkHldm4k%2BQCNiX25Nq3iDzW8CXHxpQ8Z3aUqKYWzseyIVVO9n2qThcQWQ5ISokCduTgd9bi%2BMMpqjF7x3QRR4mGB53CQux5xYg1LfZ4fuX2tONkL9KiEZuZVPiHIWmA6zAD0KwnzxGp0lfyA4h2qHLvHt5LXhaFbJua8pRI7ZgLuOvx5sqLYSCKUJWcVqAIUcYA%3D%3D%7Ctkp%3ABk9SR5D35rfmYA...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Toni.G, Thanks for the code - I may check it out and test it when my PCB comes in. Right now my breadboard is serving up the time via GPS, and I don't want to mess with it while its working! Attached is the PCB that will replace my breadboard and make my old clock a real appliance lol. If it works as planned, I have 5 boards on order and can send you one for your project. I see the 1638 uses the STROBE line so I'm pretty sure you could use it in your projects. The board is based on the PIC18F16Q40...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    For anyone who may find this useful: This code will save me a button for adjusting for Daylight Savings Time in my area. Most of the US observes Daylight Savings Time. It Starts Nov 6th and Ends March 13th. My UTC offset is -4 hours, so I convert this offset for my area, which is Eastern Standard Time. The conversion handles crossing over into the next day. So at 8pm my time Greenwich is at 12:am, or 00:00:00 So I derive the UTC time from the GPS sentence, and check to see if the current month/day...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Ok Another few days of staring at Datasheets and tinkering. I got the TM1628 to work, but it has a totally different mapping scheme the GCB and any existing library out there (Ardino) will not work. Here is my first pass at getting a functional program working. I may plan a pcb board of my own with a button to change the hour to +- daylight savings / Time zone adjustment. Right now its hard coded for Eastern Standard time so i will have to modify in a few weeks. It wasn't fun trying to get LEDs to...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I just got a hold of an LED Clock that is driven by the TM1628 LED driver chip. The clock board is VERY inaccurate. It looses about 15 to 20 seconds per day and find I have to adjust it after only a couple of weeks. My plan is to program a PIC to use GPS time for accuracy. The PIC to GPS code has already been figured out and all I have to do is drive the LED display. The cpu board that came with the clock is completely separate from the LED driver board. The two boards are connected by a convenient...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Hello, I just got a hold of an LED Clock that is driven by the TM1628 LED driver chip. The clock board is VERY inaccurate. It looses about 15 to 20 seconds per day and find I have to adjust it after only a couple of weeks. My plan is to program a PIC to use GPS time for accuracy. The PIC to GPS code has already been figured out and all I have to do is drive the LED display. The cpu board that came with the clock is completely separate from the LED driver board. The two boards are connected by a convenient...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    I know the variable types : Single, Double and Float are 'experimental' in GCB. Has there been any further thought of implementing them for math operations (Multiplication, Division)? Below is code that works in VisualBasic.NET that derives the registers for the SI5351a clock generator. Mostly Unsigned 32 bit integers which GCB can handle, and a float variable (currently N/A in GCB). I have been told I could use Integer math to do the same thing, but at a loss on how to do it. ' Calc Output Multisynth...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Well that one flew over my head. The PICInfo Icon is now staring at me saying why didn't you start here? lol Very nice tool. thanks for the education. regards, Jeff

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    I was looking to explore my chip's power consumption capability utilizing SLEEP and Watch dog timer. I noticed that I was starting blind on what syntax to use to configure the Watch dog timer. As with all chips we start by reading the Datasheet. The chip I'm using, PIC18F16Q40 has the capability of enabling the Watch dog timer by software or the WDTE config bit. Current examples refer to syntax like : WDT = ON. This is just not compatible for the chip I'm using. I was completely at a loss on syntax...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    William, Didn't make any changes to original way SMT was configured from your code - Still a Gated Counter. The original variable PulseCount was set up with the SMTTMR bytes as you authored: 'Orginal - Existing Dim DUMMY as Byte : Dummy = 0 Dim PulseCount Alias DUMMY,SMT1TMRU,SMT1TMRH,SMT1TMRL AS LONG 'New from last post Dim Dummy_Byte as Byte: Dummy_Byte = 0 Dim SMT1_COUNTER, as Long ALIAS Dummy_Byte, SMT1TMRU, SMT1TMRH,SMT1TMRL SMT1_COUNTER = 0 Both sets of variable return exactly the same numbers:...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    William, Didn't make any changes to original way SMT was configured from your code - Still a Gated Counter. The original variable PulseCount was set up with the SMTTMR bytes as you authored: 'Orginal - Existing Dim DUMMY as Byte : Dummy = 0 Dim PulseCount Alias DUMMY,SMT1TMRU,SMT1TMRH,SMT1TMRL AS LONG 'New from last post Dim Dummy_Byte as Byte: Dummy_Byte = 0 Dim SMT1_COUNTER, as Long ALIAS Dummy_Byte, SMT1TMRU, SMT1TMRH,SMT1TMRL SMT1_COUNTER = 0 Both sets of variable return exactly the same numbers:...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    I redownloaded the usart.h and confirmed it is indeed the latest. I see the following comment in the usart.h file: ' 22/08/2022 Revised HSerPrint and HSerPrintRC to ensure HSerSend uses Byte, Byte overloaded method. Fixes USART1 and USART2 overwrite/corruption issue Attached are my runs on both USART1 and USART2. I had to make a hardware wiring temporary change to get USART1 to send to the Northern Software serial usb. Both captures show the same result. I re-ran the PulseCount and still have a 10s...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    I redownloaded the usart.h and confirmed it is indeed the latest. I see the following comment in the usart.h file: ' 22/08/2022 Revised HSerPrint and HSerPrintRC to ensure HSerSend uses Byte, Byte overloaded method. Fixes USART1 and USART2 overwrite/corruption issue Attached are my runs on both USART1 and USART2. I had to make a hardware wiring temporary change to get USART to send to the Northern Software serial usb. Both captures show the same result. I re-ran the PulseCount and still have a 10s...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    William, I think I'm going to move on. By multiplying by a factor of 10 the true frequency is only a few tens of hertz off. 1 hertz accuracy is not needed in my application. I've spent too much time on this already and I've coaxed you to spend too much time on it as well! Maybe its a bug in the chip even though the chip is only slightly different. I tried another frequency generator and still the same truncation. If you have an extra DIP Q41 lying around that you tested with I'll certainly try over...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Morning William, I get similar numbers: 40 Meters (7 Mhz): SMT1CPWU = 10 SMT1CPWH =189 SMT1CPWL = 251 Frequency Count = 703995 20 Meters (14 Mhz): SMT1CPWU = 21 SMT1CPWH =130 SMT1CPWL = 144 Frequency Count = 1409680 Now I may have not replaced the correct include file. I'm assuming this path to the usart.h: C:\GCB@Syn\GreatCowBasic\Include\lowlevel\usart.h The new file shows a size of 57,344 bytes (size on disk) Jeff

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Yes another reason not to go back to that chip. Thanks for the info

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Sounds Promising. I will be keen to know what the results may be. Attached is my project before I started experimenting with the PIC18F16Q40. I still plan on staying with this new chip, but I'm curious if I could get this board to work in Great Cow Basic. The PIC is a PIC18F46K22 and it looks like PPS does not cover this chip currently. The closest is the PIC18F46K40 which is covered, but it looks like the PPS needs an exact match. How easy would it be to ad the PIC18F46K22 to the PPS setup? The...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Yes get_val is looking for NMEA from the GPS module. This is a constant stream of data coming out of the module, sending data out once per second basically the whole do forever loop is counting on this. you can basically remark out the entire Do forever loop as its parsing GPS data (GPS TIME, Status, GPS Location) continuously. TX_OFF() and TX_ON() just turn my7Mhz clock source off and on they can be remmed out too All the EPreads are not of consequence either i dont think. Attached is my Dev board...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Yes get_val is looking for NMEA from the GPS module. This is a constant stream of data coming out of the module, sending data out once per second basically the whole do forever loop is counting on this. you can basically remark out the entire Do forever loop as its parsing GPS data (GPS TIME, Status, GPS Location) continuously. TX_OFF() and TX_ON() just turn my7Mhz clock source off and on they can be remmed out too All the EPreads are not of consequence either i dont think Jeff

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Looking at the pulsecount issue a little further I gathered what I believe are the correct values coming back from the counter gate: SMT1TMRU: Accesses the upper byte TMR[23:16] ==> 21 decimal SMT1TMRH: Accesses the high byte TMR[15:8] ==> 130 decimal SMT1TMRL: Accesses the low byte TMR[7:0] ==> 174 decimal 'I also checked the capture values and they are exactly the same as above SMTxCPRU: Accesses the upper byte CPR[23:16] SMTxCPRH: Accesses the high byte CPR[15:8] SMTxCPRL: Accesses the low byte...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Looking at the pulsecount issue a little further I gathered what I believe are the correct values coming back from the counter gate: SMT1TMRU: Accesses the upper byte TMR[23:16] ==> 21 decimal SMT1TMRH: Accesses the high byte TMR[15:8] ==> 130 decimal SMT1TMRL: Accesses the low byte TMR[7:0] ==> 174 decimal 'I also checked the capture values and they are exactly the same as above SMTxCPRU: Accesses the upper byte CPR[23:16] SMTxCPRH: Accesses the high byte CPR[15:8] SMTxCPRL: Accesses the low byte...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Looking at the pulsecount issue a little further I gathered what I believe are the correct values coming back from the counter gate: SMT1TMRU: Accesses the upper byte TMR[23:16] ==> 21 decimal SMT1TMRH: Accesses the high byte TMR[15:8] ==> 130 decimal SMT1TMRL: Accesses the low byte TMR[7:0] ==> 174 decimal 'I also check the capture values and they are exactly the same as above SMTxCPRU: Accesses the upper byte CPR[23:16] SMTxCPRH: Accesses the high byte CPR[15:8] SMTxCPRL: Accesses the low byte...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Looking at the pulsecount issue a little further I gathered what I believe are the correct values coming back from the counter gate: SMT1TMRU: Accesses the upper byte TMR[23:16] ==> 23 decimal SMT1TMRH: Accesses the high byte TMR[15:8] ==> 130 decimal SMT1TMRL: Accesses the low byte TMR[7:0] ==> 174 decimal 'I also check the capture values and they are exactly the same as above SMTxCPRU: Accesses the upper byte CPR[23:16] SMTxCPRH: Accesses the high byte CPR[15:8] SMTxCPRL: Accesses the low byte...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    William, Thanks for taking a look at it. I've tried several other frequency bands and the last digit truncation is consistent If I simply multiply the result I'm getting by 10 I'm accurate to within 10 Hertz, which is completely fine for my project. I will circle back to this as the workaround will for now get me answers that are close enough. Thanks for taking a look

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Evan and William, I'm working with Northern Software's .NET SDK and it has the capability of connecting, resetting and programing PICs all via .NET software. So it's a VERY useful tool. I'm currently working on a VB.NET front end to take advantage of all those things. One thing that is also possible is the ability to connect via a USART channel. I can create two way communication between the NS chip and the target MCU. (My recent posts are related to this capability) Communication is a bit quirky...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Evan and William, I'm working with Northern Software's .NET SDK and it has the capability of connecting, resetting and programing PICs all via .NET software. So it's a VERY useful tool. I'm currently working on a VB.NET front end to take advantage of all those things. One thing that is also possible is the ability to connect via a USART channel. I can create two way communication between the NS chip and the target MCU. (My recent posts are related to this capability) Communication is a bit quirky...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Evan and William, I'm working with Northern Software's .NET SDK and it has the capability of connecting, resetting and programing PICs all via .NET software. So it's a VERY useful tool. I'm currently working on a VB.NET front end to take advantage of all those things. One thing that is also possible is the ability to connect via a USART channel. I can create two way communication between the NS chip and the target MCU. (My recent posts are related to this capability) Communication is a bit quirky...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Evan and William, I'm working with Northern Software's .NET SDK and it has the capability of connecting, resetting and programing PICs all via .NET software. So it's a VERY useful tool. I'm currently working on a VB.NET front end to take advantage of all those things. One thing that is also possible is the ability to connect via a USART channel. I can create two way communication between the NS chip and the target MCU. (My recent posts are related to this capability) Communication is a bit quirky...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Evan and William, I'm working with Northern Software's .NET SDK and it has the capability of connecting, resetting and programing PICs all via .NET software. So it's a VERY useful tool. I'm currently working on a VB.NET front end to take advantage of all those things. One thing that is also possible is the ability to connect via a USART channel. I can create two way communication between the NS chip and the target MCU. (My recent posts are related to this capability) Communication is a bit quirky...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    William, I changed the value of PulseCount: 'Interrupt routine Sub ShowPulseCount comport = 2 'Manually change Pulsecount to a value I'm expecting PulseCount = 7040123 HSerprint PulseCount,2 HSerPrintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB The value of 7040123 went through the UART2 without a problem. I changed the PulseCount back to the SMTValues and the return goes back to 6 digits. attached is the entire program with all the extra...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    William, I changed the value of PulseCount: 'Interrupt routine Sub ShowPulseCount comport = 2 'Manually change Pulsecount to a value I'm expecting PulseCount = 7040123 HSerPrintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB The value of 7040123 went through the UART2 without a problem. I changed the PulseCount back to the SMTValues and the return goes back to 6 digits. attached is the entire program with all the extra GPS and Si5351 (clock...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Nice simulation. One thing I did notice when counting on my end is that I'm losing the last digit of the Pulse count. So in the interrupt, I printed the Upper, High and Low bytes of the SMT count: 'Interrupt routine Sub ShowPulseCount comport = 2 HSerprint PulseCount,2 'HSerPrint SMT1TMRL,2 'HSerPrint SMT1TMRU,2 'HSerPrint SMT1TMRH,2 HSerprintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB These are the results I get: L = 56 H = 704056190...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Nice simulation. One thing I did notice when counting on my end is that I'm losing the last digit of the Pulse count. So in the interrupt, I printed the Upper, High and low bytes of the SMT count: 'Interrupt routine Sub ShowPulseCount comport = 2 HSerprint PulseCount,2 'HSerPrint SMT1TMRL,2 'HSerPrint SMT1TMRU,2 'HSerPrint SMT1TMRH,2 HSerprintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB These are the results I get: L = 56 H = 704056190...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Nice simulation. One thing I did notice when counting on my end is that I'm losing the last digit of the Pulse count. So in the interrupt, I printed the Upper High and low bytes of the SMT count: 'Interrupt routine Sub ShowPulseCount comport = 2 HSerprint PulseCount,2 'HSerPrint SMT1TMRL,2 'HSerPrint SMT1TMRU,2 'HSerPrint SMT1TMRH,2 HSerprintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB These are the results I get: L = 56 H = 704056190 U...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Nice simulation. One thing I did notice when counting on my end is that I'm losing the last digit of the Pulse count. So in the interrupt, I printed the Upper High and low bytes of the SMT count: 'Interrupt routine Sub ShowPulseCount comport = 2 HSerprint PulseCount,2 'HSerPrint SMT1TMRL,2 'HSerPrint SMT1TMRU,2 'HSerPrint SMT1TMRH,2 HSerprintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB These are the results I get: L = 56 H = 704056190 U...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Nice simulation. One thing I did notice when counting on my end is that I'm losing the last digit of the Pulse count. So in the interrupt, I printed the Upper High and low bytes of the SMT count: 'Interrupt routine Sub ShowPulseCount comport = 2 HSerprint PulseCount,2 'HSerPrint SMT1TMRL,2 'HSerPrint SMT1TMRU,2 'HSerPrint SMT1TMRH,2 HSerprintCRLF,2 comport = 1 PulseCount = 0 ' Clear SMT1 TIMER/Counter SMT1GO = 1 ' Enable Next Acquisition End SUB These are the results I get: L = 56 H = 704056190 U...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    William, Very nice! I will be testing out today. I understood most of the code and the one brick wall that was stopping me from moving forward with SMT was this line you wrote: On INterrupt SMT1PulseWidthAcquired Call ShowPulseCount The actual Interrupt name of 'SMT1PulseWidthAquired'. I had no idea where to look for that. SMT is definitely the way to go as I may have to sample frequencies as high as 50Mhz (the 6 meter Ham band) . Another question: I dont see an #include smt_timers.h in the code....

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Thank you for all the videos that are specific to this chip family! makes it much easier when you repetitively demonstrate through your videos the setup of these things. I'm a bit weary of trying to find a chip that will suit my needs (and is available!). I'm downsizing from the 40 pin monsters. I have just enough, with 20 pins. And the smaller size allows me to go back to old school DIP chips allowing for quick swap out. Maybe someday I'll go back to a SMT PIC, but It will definitely be this chip...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    This compiles, but you will need a GPS with PPS out and signal source of 2Mhz: #CHIP PIC18F16Q40 #CONFIG LVP=ON #option explicit #Include <SMT_Timers.h> #startup InitPPS, 85 #define PPSToolPart 18f16q40 Sub InitPPS 'Module: I2C1 RB6PPS = 0x0021 'SCL1 > RB6 I2C1SCLPPS = 0x000E 'RB6 > SCL1 (bi-directional) RB4PPS = 0x0022 'SDA1 > RB4 I2C1SDAPPS = 0x000C 'RB4 > SDA1 (bi-directional) 'Module: TMR1 T1CKIPPS = 0x0014 'RC4 > T1CKI 'Module: UART1 RC6PPS = 0x0010 'TX1 > RC6 U1RXPPS = 0x0017 'RC7 > RX1 'Module:...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    I decided to refer to and older project where I did something very similar using Timer1. I'm satisfied enough with the results and I'm only 2 to 3 Hertz off the measured frequencies with my scope and commercial frequency counter. Method: 1) Set the frequency to be measured to 2Mhz 2) Count the frequency using the below code 3) Take the difference between measured and actual 4) Apply a scale factor by taking desired frequency / 2Mhz Example: 14Mhz / 2 Mhz is a scale factor of 7 so if my difference...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    I decided to refer to and older project where I did something very similar using Timer1. I'm satisfied enough with the results and I'm only 2 to 3 Hertz off the measured frequencies with my scope and commercial frequency counter. Method: 1) Set the frequency to be measured to 2Mhz 2) Count the frequency using the below code 3) Take the difference between measured and actual 4) Apply a scale factor by taking desired frequency / 2Mhz Example: 14Mhz / 2 Mhz is a scale factor of 7 so if my difference...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    I decided to refer to and older project where I did something very similar using Timer1. I'm satisfied enough with the results and I'm only 2 to 3 Hertz off the measured frequencies with my scope and commercial frequency counter. Method: 1) Set the frequency to be measured to 2Mhz 2) Count the frequency using the below code 3) Take the difference between measured and actual 4) Apply a scale factor by taking desired frequency / 2Mhz Example: 14Mhz / 2 Mhz is a scale factor of 7 so if my difference...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Thank you for your kind assistance! I've read up on chapter 27 and I've gotten a better (not complete) understanding of how to use the SMT. Here is the state of the code below. I've added the SMT signal and window input pins via the PPS tool, and tried to document what I think I know. I'm pretty sure I set the mode to be 'Gated Counter'. The code runs but I get a bunch of 0's then some numbers. but I do see the numbers change when a GPS pulse does occur. I'm not sure how to set the interrupt so I...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Thank you for your kind assistance! I've read up on chapter 27 and I've gotten a better (not complete) understanding of how to use the SMT. Here is the state of the code below. I've added the SMT signal and window input pins via the PPS tool, and tried to document what I think I know. I'm pretty sure I set the mode to be 'Gated Counter'. The code runs but I get a bunch of 0's then some numbers. but I do see the numbers change when a GPS pulse does occur. I'm not sure how to set the interrupt so I...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Thank you for your kind assistance! I've read up on chapter 27 and I've gotten a better (not complete) understanding of how to use the SMT. Here is the state of the code below. I've added the SMT signal and window input pins via the PPS tool, and tried to document what I think I know. I'm pretty sure I set the mode to be 'Gated Counter'. The code runs but I get a bunch of 0's then some numbers. but I do see the numbers change when a GPS pulse does occur. I'm not sure how to set the interrupt so I...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output on PortC.3 to get me an accurate 1PPS. I want to count how many pulses on PortC.4 that occur between pulses on PortC.3 (accurate 1 second GPS pulses) to hopefully get an accurate frequency in HZ. Hardware wise I'm not sure if I should have pull-down resistor's on both the GPS and frequency line. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm adding 65536 to the...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output on PortC.3 to get me an accurate 1PPS. I want to count how many pulses on PortC.4 that occur between pulses on PortC.3 (accurate 1 second GPS pulses) to hopefully get an accurate frequency in HZ. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm adding 65536 to the counter. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output on PortC.3 to get me an accurate 1PPS. I want to count how many pulses on PortC.4 that occur between pulses on PortC.3 (accurate 1 second GPS pulses) to hopefully get an accurate frequency in HZ. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm adding 65536 to the counter. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output on PortC.3 to get me an accurate 1PPS. I want to count how many pulses on PortC.4 that occur between pulses on PortC.3 (accurate 1 second GPS pulses) to hopefully get an accurate frequency in HZ. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output on PortC.3 to get me an accurate 1PPS. I want to count how many pulses on PortC.4 within the GPS second to hopefully get an accurate Hz count. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What I'm not sure of is...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output on PortC.3 to get me accurate 1PPS. I want to count how many pulses on PortC.4 within the GPS second to hopefully get an accurate Hz count. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What I'm not sure of is the...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output to get me accurate 1PPS. I want to count how many pulses on PortC.4 within the GPS second to hopefully get an accurate Hz count. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What I'm not sure of is the proper setup...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output to get me accurate 1PPS. I want to count how many pulses on PortC.4 within the GPS second to hopefully get an accurate Hz count. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What I'm not sure of is the proper setup...

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output to get me accurate 1PPS. I want to count how many pulses on PortC.4 within the GPS second to hopefully get an accurate Hz count. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm getting like 31250 counts. What I'm not sure of is the proper setup...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Hello, I have an input frequency of 7 Mhz on PortC.4 I am also using a GPS which has Pulse Per Second output to get me accurate 1PPS. I want to count how many pulses on PortC.4 within the GPS second to hopefully get an accurate Hz count. I have an interrupt routine setup to interrupt when Timer1 overflows then I'm counting the TIMER1 overflow as having counted 65536 pulses. I think I am close but not getting the correct answer. I'm getting like 470000 counts. What I'm not sure of is the proper setup...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Hello again, I'm in the process of converting code from MikroBasic to GCB and I'm getting a strange value back from USART2. Basically the code in MB worked by checking if there was data ready on either UART1 or UART2, then reading it: 'MikroBasic Code... if UART1_Data_Ready() = 1 then receive = UART1_Read() Select Case receive Case "0" OpMode = 0 'Initial Operation AutoPPS = 0 Case "1" 'Cant enter diagnostic until we have a fix If GPSMode = 1 then OpMode = 1 'GPS Diagnostic UART1_Write_Text("GPS...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Thanks for the confirmation Anobium. I see the matching behavior now

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Thanks I tried your method and got rid of my sub main. Much more elegant! MainLoop: Do Forever... Thanks!

  • Jeff Weinmann Jeff Weinmann modified a comment on discussion Help

    Hello, I've Setup My PIC18F16Q40 just like Evan's video example, with an additional hardware UART: Sub InitPPS 'Module: I2C1 RB6PPS = 0x0021 'SCL1 > RB6 I2C1SCLPPS = 0x000E 'RB6 > SCL1 (bi-directional) RB4PPS = 0x0022 'SDA1 > RB4 I2C1SDAPPS = 0x000C 'RB4 > SDA1 (bi-directional) 'Module: UART pin directions Dir PORTC.6 Out ' Make TX1 pin an output Dir PORTC.7 In ' Make RX1 pin an input Dir PORTC.0 Out ' Make TX2 pin an output Dir PORTC.1 In ' Make RX2 pin an input 'Module: UART1 RC6PPS = 0x0010 'TX1...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Hello, I've Setup My PIC18F16Q40 just like Evan's video example, with an additional hardware UART: Sub InitPPS 'Module: I2C1 RB6PPS = 0x0021 'SCL1 > RB6 I2C1SCLPPS = 0x000E 'RB6 > SCL1 (bi-directional) RB4PPS = 0x0022 'SDA1 > RB4 I2C1SDAPPS = 0x000C 'RB4 > SDA1 (bi-directional) 'Module: UART pin directions Dir PORTC.6 Out ' Make TX1 pin an output Dir PORTC.7 In ' Make RX1 pin an input Dir PORTC.0 Out ' Make TX2 pin an output Dir PORTC.1 In ' Make RX2 pin an input 'Module: UART1 RC6PPS = 0x0010 'TX1...

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    I ended up placing the main loop in a Sub routine called Main. It is now listed at the top and is very easy to access! Main() Sub Main() Do Forever ....... Loop End Sub

  • Jeff Weinmann Jeff Weinmann posted a comment on discussion Help

    Hello, I have many lines of code with several Dimensions, Defines and Comments along with large sub routines. Is there a way to bookmark the Main Loop Area and somehow navigate to it like you would a sub routine? on the left in the IDE? thanks, Jeff

1