Very good!! Evan you have resesitated some of my old code. Each time I came back to it , it was broken. I'll have to put this into a current project. I have too many distractions. When i retired I intended to help the GCB project by writing h files and editing the help files but my intentions fell short. i have implemented many small projects with GCB. I am currently interested in radio astronomy. I have been testing different smoothing filters because radio noise is just that noisy. Right now i...
In some other language: int left = x << 2; // Shift left by 2 -> 00000100 (Decimal 20) int right = x >> 1; // Shift right by 1 -> 00000010 (Decimal 2) I am only giving suggestions. Not asking for change. BW M
In some other language: int left = x << 2; // Shift left by 2 -> 00000100 (Decimal 20) int right = x >> 1; // Shift right by 1 -> 00000010 (Decimal 2)
Some sensors require shifting of the raw data. ie. adc_T = adc_T/16 ' shift to the right 4 places the code would be : shift adc_T, right shift adc_T, right shift adc_T, right shift adc_T, right Looks like you need a number in your command? Sorry, Greetings Anobium!
Thank You Anobium!! It works! How did you find it? Where did you look? BR Mike
Just checking RC0 again. Sub InitPPS UNLOCKPPS RC2PPS = 0x16; //RC2->EUSART2:TX1; swapped RC0PPS = 0x13; //RC0->EUSART1:TX2; So I swapped the 0x13 and 0x16. Now the "USART1" message comes out of Port RC0 instead of RC2. No action on RC2. I am swapping them back.
In the above assembly, I just realized that it don't have to go through line 208. Comport is 2 when HSERSEND345 routine is called and then the SELECT sends you to "SysSelect1Case2" , so it should work! Iam at a loss for the how this piece of code in USART.H works though. #ifdef Var(TXREG2) //~WRITE THE DATA BYTE TO THE USART //~ Sets register to value of SerData - where register could be TX2REG, TXREG2 or U2TXB via the #samevar #IFDEF VAR(TX2REG) TX2REG = SerData #ELSE TXREG2 = SerData #ENDIF How...
The the .asm file banksel TX1REG movwf TX1REG HSERSENDUSART2HANDLER goto SysSelectEnd1 SysSelect1Case2 movlw 2 subwf COMPORT,W Line 208 goto SysSelectEnd1 ,looks like it prevents getting to the 2cd USART.