Search found 17 matches

by Rickado
Wed Mar 22, 2017 10:34 pm
Forum: General
Topic: PicKit2 Standalone Programmer
Replies: 4
Views: 5152

Re: PicKit2 Standalone Programmer

Found a stand alone programmer from Northern Software (NSDSP-1-5V) very fast and works well. Programs most Microchip microcontrollers. Very happy...
by Rickado
Thu Feb 16, 2017 2:47 am
Forum: General
Topic: PicKit2 Standalone Programmer
Replies: 4
Views: 5152

PicKit2 Standalone Programmer

Has anyone updated the PK2Device.dat file for the PicKit2 to program the Pic18F46K40.
Cheers Rickado
by Rickado
Tue Jun 14, 2011 4:08 am
Forum: Modules
Topic: SetAllDigital() for J and K series with SE support
Replies: 13
Views: 13463

Jerry (for the PIC18F2X/4XK22 series) you'll have to add VREFCON.5 = 0 or VREFCON = 0 because if bit.5 = 1, it overrides digital output ie overrides the PORT data output. See Section 22.6 DAC Voltage Reference Output of the K22 series datasheet. Also For the 18F1230 and 18F1330 devices I see you hav...
by Rickado
Sat Jun 11, 2011 11:51 pm
Forum: Modules
Topic: SetAllDigital() for J and K series with SE support
Replies: 13
Views: 13463

With the PIC18(L)F2X/4XK22 series you'll also have to ensure the DACOE bit = 0. 22.6 DAC Voltage Reference Output The DAC can be output to the DACOUT pin by setting the DACOE bit of the VREFCON1 register to ‘1’. Selecting the DAC reference voltage for output on the DACOUT pin automatically overrides...
by Rickado
Fri Jun 10, 2011 2:12 am
Forum: Modules
Topic: SetAllDigital() for J and K series with SE support
Replies: 13
Views: 13463

In the Pic18F2x/4xk22 series CMxCON0 => 0 has nothing to do with analog=> digital Input/output I know this is not the case with all pics. By default CMxCON0 = %00001000 =>comparator disabled Putting bit3 (CxSP) => 0 puts the comparator in low power low speed mode when enabled. (CMxCON0.7=1) :? if th...
by Rickado
Thu Jun 09, 2011 1:41 am
Forum: Modules
Topic: SetAllDigital() for J and K series with SE support
Replies: 13
Views: 13463

You missed me out :( // 18F4xK22 family #elseif _device in (18F43K22, 18F44K22, 18F45K22, 18F46K22) // registers $0F38 - $0F5F are not part of the access bank write_sfr(ANSELA, $00) write_sfr(ANSELB, $00) write_sfr(ANSELC, $00) write_sfr(ANSELD, $00) write_sfr(ANSELE, $00)
by Rickado
Sun Feb 06, 2011 1:42 am
Forum: Modules
Topic: USART.READFLOAT problem
Replies: 5
Views: 3937

Here's a function to try, it converts HyperTerm into Float {*************************************************************************** * HyperTermFlt = TermFlt // pCount = Num+Fix No BackSpace Converts a TerminalIn String value into a Float Outputs WriteByte thru Tx ********************************...
by Rickado
Tue Jan 18, 2011 10:18 pm
Forum: Compiler
Topic: Latest version of MPASMwin
Replies: 14
Views: 8355

It should work fine, it just means you wont be able to use the full amount of ram $0F38. SF will think $0F00 is the max amount of ram
by Rickado
Tue Jan 18, 2011 9:39 pm
Forum: Compiler
Topic: Latest version of MPASMwin
Replies: 14
Views: 8355

Looks like the pic18f26k22 has an incorrect
#variable _maxram

also or is there something I'm missing
by Rickado
Tue Jan 18, 2011 7:28 am
Forum: Compiler
Topic: Latest version of MPASMwin
Replies: 14
Views: 8355

Beware when converting pic18f46k22.

In 18F46K22.bas file
#variable _maxram = $0F60 // 3936 bytes of user RAM

will have to be changed to
#variable _maxram = $0F38 // 3896 bytes of user RAM from DataSheet
by Rickado
Sat Jan 08, 2011 4:36 am
Forum: Compiler
Topic: question about optimizing code and the code generator
Replies: 2
Views: 2099

I'm with you Jerry. Could it be something to do with the different PIC18 out there? The only thing is when you tested it with only few declarations and statements, all the tests ended up being very simple 'btfss' type instructions. Another though is as Status can be seen anywhere (ie it doesn't matt...
by Rickado
Thu Dec 09, 2010 8:23 pm
Forum: Modules
Topic: Error in USART Module with Baudrate Constants
Replies: 1
Views: 2056

Error in USART Module with Baudrate Constants

From DataSheets Baudrate = Fosc/(Fmult *(SPBRGRegister + 1)) therefore SPBRGRegister + 1 =Fosc/(Fmult * Baudrate) therefore SPBRGRegister = (Fosc/(Fmult * Baudrate)) - 1 So br300 to br115200 which goes into SPBRGRegister should be br300 = Fosc/(Fmult * 300) - 1 + 0.5, // + 0.5 for rounding ie no + 1...
by Rickado
Wed Dec 08, 2010 8:37 pm
Forum: Modules
Topic: Problem with DS18B20 Module when using negative temperatures
Replies: 0
Views: 3220

Problem with DS18B20 Module when using negative temperatures

Problem with DS18B20 Module when using negative temperatures Public Sub GetTemp(ByRef pTemp As ShortInt, ByRef pFraction As Word) and Public Function GetTempAsStr() As String Return incorrect negative Temperatures From DS18B20 datasheet -0.5 outputs %11111111 11111000 but module returns -1.5 -10.125...
by Rickado
Fri Jun 04, 2010 2:20 am
Forum: Compiler
Topic: Disable RAM Optimisation?
Replies: 16
Views: 10715

eg. ASM code produced ?I000435_F014_000461_P000292 ; L#MK FONSEARCH() MOVLB 3 MOVF M20_U16H,0 IORWF M20_U16,0 MOVLB 0 BZ END_EXECUTE_FONSEARCH0 RCALL EXECUTE_FONSEARCH0 BRA END_EXECUTE_FONSEARCH0 EXECUTE_FONSEARCH0 MOVFF M21_U08,PCLATH MOVLB 3 <--------------bsr changed MOVF M20_U08,0 MOVWF PCL,0 EN...
by Rickado
Fri Jun 04, 2010 1:42 am
Forum: Compiler
Topic: Disable RAM Optimisation?
Replies: 16
Views: 10715

Try putting
ASM-
movlb 0
End ASM

at the beginning of the event as bsr can change to get there.