Search Results - Proton BASIC community web site


Search:

Type: Posts; User: tumbleweed

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Replies
    29
    Views
    724

    Re: Peripheral Pin Select Module how to

    For most peripherals the TRISx register (and all of the other pin mode registers: slew rate, analog/digital, od, etc) still controls if the pin is output or input.
  2. Replies
    67
    Views
    2,798

    Re: Positron and Positron16 dev boards

    Also, for debugging you shouldn't have to reassemble anything.

    If you compile in the Proton IDE I would think you should be able to load the .cof file into mplabx and debug using that.
    Creating a...
  3. Replies
    67
    Views
    2,798

    Re: Positron and Positron16 dev boards

    MPASM (or mpasmx) is the assembler used for 8-bit devices.

    For the 16-bit parts, xc16-as is used as the assembler, which is a port of the GNU assembler from the XC16 package.
    That requires using...
  4. Re: Proton and MplabX Ide 5.1 and debug Pickit 3

    I'm not a fan of software-based simulators either... they're limited in what they can do and you're at the mercy of the simulator folks as far as properly simulating real-world conditions.

    I only...
  5. Re: Proton and MplabX Ide 5.1 and debug Pickit 3

    A serial-based debugger like that isn't worth the bother IMHO.
    Too much stuff has to work for the debugger to be of any use, and the debugger takes up resources and affects how your program...
  6. Re: Latest Proton and Proton Compiler Update for Versions 3.7.3.8 and 1.0.7.1

    Does the uninstaller still wipe out all the registry entries under HKCU\Software\MecaniqueUK?
    In the past it's been removing almost everything there, including stuff that doesn't belong to Proton.
  7. Re: Proton and MplabX Ide 5.1 and debug Pickit 3

    I warned you. Mplabx v5.35 is the last one that includes MPASM.
    Past that the only assembler that works is the XC8 pic-as assembler, and it's not MPASM compatible.

    It would require writing a...
  8. Re: Proton and MplabX Ide 5.1 and debug Pickit 3

    Might as well stick with MPLABX 5.35
    5.40 removes support for MPASM
  9. Re: Speed difference between 8 & 16 bit PICS

    Just to clarify
  10. Re: Speed difference between 8 & 16 bit PICS

    That would explain it. Change it to a byte and they'll likely be a lot closer.[/SIZE][/FONT][/SIZE][/FONT]
  11. Re: Speed difference between 8 & 16 bit PICS

    I wouldn't have thought so, but how is "Pass" declared?

    Also, I assume you've added code to setup the osc so the chips are running at the speed you think they are?
  12. Re: Creating hybrid hex for PIC microcontroller

    I've got news for you.

    Despite what you say, it's not working in your current project either. Unless you've made other changes, simple adding
    'Declare PROTON_START_ADDRESS = $1000'
    will not get...
  13. Re: Creating hybrid hex for PIC microcontroller

    I'm glad you finally noticed that it doesn't work.

    Interrupts still will not work properly. There are no interrupt vector jumps.

    Besides, you can't be serious about having to load the program...
  14. Re: Port Expander reading 16 inputs with debouncing

    Microchip has an app note on using an MCP23xxx port expander to read a key matrix

    http://ww1.microchip.com/downloads/en/Appnotes/01081a.pdf
  15. Replies
    24
    Views
    1,674

    Re: pic18f4550 Is there a usb connection?

    I have no idea how you would attempt such a thing. I wouldn't even consider it as a solution.

    Also, you'll probably have to switch to a different pic. All of the USB + network applications I've...
  16. Replies
    24
    Views
    1,674

    Re: pic18f4550 Is there a usb connection?

    Huh?

    That would be a kludge of epic proportions.
    [/SIZE][/FONT][/SIZE][/FONT]
  17. Re: Creating hybrid hex for PIC microcontroller

    I have to admit there is no infinite loop at the end of the hex#1 section, so eventually you'll get to the second hex.
    I don't know how you get it to generate that code since at the end of all the...
  18. Re: Creating hybrid hex for PIC microcontroller

    [/SIZE][/FONT]
    [/SIZE][/FONT]Not for both HID and CDC without additional code.

    Post a combined hex file you've created using this method.
  19. Re: Creating hybrid hex for PIC microcontroller

    I don't see how that would work. At the end of the first file is something like this:


    usbcdc
    F1_EOF equ $ ; TEST.BAS
    _pblb__7
    bra _pblb__7

    So when you 'GOTO usbcdc' all you do is...
  20. [SOLVED !] Re: Possiblility to use HSEROUT for 1 PIC, AND SERIN for an other PIC

    If everything is working properly they would be the same.
  21. [SOLVED !] Re: Possiblility to use HSEROUT for 1 PIC, AND SERIN for an other PIC

    I wouldn't do it. Software-based UARTs (ie SERIN) are notoriously unreliable, especially for receiving data (not so much for transmitting).

    But, that's just me.
  22. Replies
    24
    Views
    1,674

    Re: pic18f4550 Is there a usb connection?

    To be clear, you don't normally have to add any external resistors... the pullups are part of the internal circuitry.
    Make sure you read all the notes in that diagram.

    If you do add external...
  23. Replies
    24
    Views
    1,674

    Re: pic18f4550 Is there a usb connection?

    I don't think your switch will work very well.

    The USB host (ie PC) has 15K pulldowns on the D+/D- lines. When your device attaches it pulls up one of these lines w/1.5K and that's how the host...
  24. Replies
    13
    Views
    810

    Re: I2C Help Pic18F47K40 Please!

    Les has the code for "SetAllDigital" included automatically for you now... do nothing and you get it.
  25. Replies
    13
    Views
    810

    Re: I2C Help Pic18F47K40 Please!

    Yes it does. The current compiler sets it to normal speed as part of the "SetAllDigital" initialization that Les does automatically now.
  26. Replies
    13
    Views
    810

    Re: I2C Help Pic18F47K40 Please!

    Just for reference, none of these lines has anything to do with I2CIn and I2COut...


    Declare Slow_Bus On ' Slow I2C Bus Down
    Declare Hbus_Bitrate 400 ' SET FOR LAZER = 400KHz Data Rate
    ...
  27. Replies
    6
    Views
    604

    Re: Virtual Port

    In Proton's defense, there's no way to do that in any language I'm aware of. The PIC hardware just doesn't support it.

    There are a few devices that have a virtual port PPS peripheral that you...
  28. Replies
    26
    Views
    1,188

    Re: Coronavirus Alert!!

    Good lord, how did that happen? Are you sure you don't want the virus instead?
  29. Replies
    5
    Views
    679

    Re: Compiler errors with 26Q10 device

    Because they can?

    It seems every new device these days brings new changes.
    I'm convinced it's some sort of cruel joke the developers are playing and in a backroom somewhere they sit around...
  30. Thread: Versioning

    by tumbleweed
    Replies
    20
    Views
    1,353

    Re: Versioning

    XC8 has gotten better over time. They now allow higher level of optimizations in free mode than they did originally.

    It's never ADDED useless code, it's just that in the beginning it didn't...
  31. Thread: Versioning

    by tumbleweed
    Replies
    20
    Views
    1,353

    Re: Versioning

    MPLABX (the IDE) is free, and all the XC compilers have a free mode.

    The only limitation to the free mode compilers is that they limit some of the higher optimizations levels.
  32. Re: Rsout does not work on Tx pin of the 18F25k22 but Hrsout does?

    Since you're using the 25K22 you're in luck. From the datasheet:

    So, you can switch back to using the hardware USART and if you want to invert the TX data then set bit 4 (CKTXP) in the BAUDCON1...
  33. Replies
    18
    Views
    3,400

    Re: Interrupt and SHout problem

    That is true.

    Measuring the pulse width could well be a case of something that has to be done in the ISR, but the code I was commenting on had a 'Print' statement in the ISR for the timer code,...
  34. Replies
    18
    Views
    3,400

    Re: Interrupt and SHout problem

    I completely agree that there's too much going on inside the ISR (especially the timer 'Print' statement which will cause all sorts of problems),
    but if you're going to do this:
    ...
  35. Replies
    10
    Views
    724

    Re: 12 to 24v step up efficency

    That does sound a bit high.

    A rough estimate of input current for a boost converter is: Vout/Vin * Iout, which should have put you somewhere in the 24/12 * 300mA = 600mA range
  36. Re: PIC18F24Q10 interrupt serial routine with terminator

    In addition to Tim's comment I have a few...

    - Move the enable interrupts to the end of the setup
    - In the ISR, it would be a good idea to check that 'Inc RX_Pntr' never exceeds the size of...
  37. Replies
    9
    Views
    1,090

    Re: SERIN/SEROUT how low can you go?

    George has a good suggestion.

    From what I can tell, SEROUT bottoms out at about 130, and it doesn't seem to really matter if it's running at 32MHz or slower.
    RSOUT works at 100 baud (no idea...
  38. Replies
    7
    Views
    990

    [SOLVED !] Re: Clean up old versions

    I uninstall all the previous versions and then reinstall the last one.
    That seems to make windows uninstaller happy (it removes all the previous instances).

    Note that if you have any other...
  39. Replies
    16
    Views
    4,510

    Re: Newbie to the forum

    Thanks, Rob. I see that now.

    I wasn't aware of that part, so it's good to know there's an option.
  40. Replies
    16
    Views
    4,510

    Re: Newbie to the forum

    Rob -

    When you say the 18F25K80 can work at elevated temperatures what are you referring to?
    AFAIK, it has the same temperature specs as pretty much all the other chips (125 degC max)
  41. Re: file missing from Proton 3.7.3.3 update??

    Thanks Les
  42. file missing from Proton 3.7.3.3 update??

    Is it just me or is the download file missing from the Proton 3.7.3.3 update post Les made yesterday?
  43. [SOLVED !] Re: MCP3421 problem with the diffrencial value when it Vin+ is more negative than Vin

    The data is in 2's complement format so you should make sure that all the upper bits reflect the setting of bit 17 (assuming you're doing an 18-bit conversion)

    How about something like this...
    ...
  44. Re: Question about Hbusin / Hbusout on PIC16F15313

    You could always go straight to the horses mouth (Microchip), pay 10x what Proton costs, and find out that their compiler/libraries don't fully support the chip you're using.

    Good luck getting...
  45. Replies
    10
    Views
    837

    Re: Need some help from a VB expert

    I think JohnB was asking about having to set RX/TX port pin directions for the PIC uart... nothing to do with the VB code per say.

    From what I recall the PPS Tool code generator doesn't set any...
  46. Replies
    19
    Views
    2,428

    Re: PPS for 8bit Microchip Micocontrollers

    I think I'd have to say no to that right now. I've modified the app for 8-bit devices, John.

    I've only glanced at it briefly but I think it would be a lot more work for the 16-bit devices.
  47. Replies
    19
    Views
    2,428

    Re: PPS for 8bit Microchip Micocontrollers

    They're GCB macros. They translate to:


    macro UNLOCKPPS
    dim IntState as bit
    IntState = GIE
    GIE = 0
    PPSLOCK = 0x55
    PPSLOCK = 0xAA
    PPSLOCKED = 0x00 'unlock PPS
  48. Replies
    12
    Views
    3,747

    Re: Anybody used the ADS1115 16bit A/D?

    It's standard 2's compliment representation, where max pos = 0x7FFF and max neg = 0x8000


    No.
    From the datasheet "This parameter expresses the full-scale range of the ADC scaling.
    No more...
  49. Replies
    7
    Views
    4,109

    Re: ICD2, ICD3 or QL200 dev board

    If you're using mplab IDE to build, the main 'Debugger' and 'Programmer' drop-downs menus control what mode is used (selecting one disables the other).

    If you want to program the device instead of...
  50. Re: dword to float changes, lost of accuracy

    not trying to nit-pick, but


    32-bits gets you roughly 6-7 decimal digits of precision. Doesn't matter (much) if the digits are before or after the decimal point, it's 6-7 digits total.
  51. Replies
    7
    Views
    4,109

    Re: ICD2, ICD3 or QL200 dev board

    The mplabx IPE supports the ICD3, but the ICD2 is too old.

    The ICD2 requires MPLAB 8. I don't remember if MPLAB had command-line drivers for the ICD2 or not.
  52. Replies
    7
    Views
    4,109

    Re: ICD2, ICD3 or QL200 dev board

    As long as you're using a device that is supported by the old MPLAB 8.92 then you can compile, program, and debug using the ICD3 in the MPLAB IDE. There are MPLAB drivers in the folder "Using Proton+...
  53. Replies
    49
    Views
    4,074

    Re: PIC 18F1330 HPWM problem

    I see what you mean. They don't show a description of the TMR2/4/6 count registers either, but they are shown in the figure 22-1 block diagram, table 22-1, and discussed in the text. I guess they...
  54. Replies
    5
    Views
    1,994

    Re: Proton USB boot loader 2019

    When you say "one of the USB pins" which pins are you referring to?

    Keep in mind-
    1) you are not allowed to source any voltage on the USB D+/D- pins, especially if the host has not asserted VBUS....
  55. Replies
    49
    Views
    4,074

    Re: PIC 18F1330 HPWM problem

    What registers would those be, John?

    From what I see the 16F1827 has 4 PWM peripherals each of which can use one of the even numbered timers (TMR2/4/6). That means you should be able to setup at...
  56. Replies
    49
    Views
    4,074

    Re: PIC 18F1330 HPWM problem

    I think the only PIC18F in that package is pretty much what you have... the 18F1320/1330.
  57. Replies
    10
    Views
    1,652

    Re: Time to wake up! (SLEEP issue)

    The order of setting CM1CON1 needs to change... the edge setting is getting over-written


    CM1CON1 = 110000 ' Allocate FVR to COMP1 positive input
    CM1CON1.6 = 1 ' C1INTP negative going edge

    ...
  58. Replies
    10
    Views
    1,652

    Re: Time to wake up! (SLEEP issue)

    There are a few things missing, such as selecting either rising or falling edge for the comparator intr

    Here are some suggestions...

    ...
  59. Replies
    11
    Views
    790

    Re: Serin baud rate / clock dependency?

    It wouldn't be too difficult to bit-bang a uart faster than 115K. Probably the most important thing with using a software uart is to remember it's a software uart.

    That means anything that can...
  60. Replies
    5
    Views
    336

    Re: PIC 16F18344 PORTA.5 issue

    To the best of my knowledge there's not much that can stop a port pin that's configured for output mode (TRISx=0) from driving the IO pin except a CONFIG setting or the ODCONx open-drain register....
  61. Re: HAVING ISSUE WITH PROC USAGE project is high speed serial backpac

    I don't think that's the case anymore... the compiler rearranges the code and puts the procs at the end.

    Anyway, here's a simple version of that code that shows the issue. When you call DispStr()...
  62. Replies
    9
    Views
    447

    Re: Pic to pic connections

    If you're going to do parallel data having an extra "data valid" line is probably a good idea.

    Otherwise you can run into issues as you update the outputs since it'll take at least two writes to...
  63. Replies
    15
    Views
    2,971

    Re: Req. I2C Scanner

    That one looks like it just might work using PP4.0 or STATUS.0 to check the ACK bit, so try:


    ' bit-banged
    Dim PP4 As Byte System
    ndevices = 0
    For addr = 0 To 254 Step 2
    BStart ' send...
  64. Replies
    15
    Views
    2,971

    Re: Req. I2C Scanner

    Looks like you're right, George.
    I took a look at the asm and maybe I'm missing something but it looks like it's anding the result and losing the flag.

    Try this and see if it works any better:
    ...
  65. Replies
    15
    Views
    2,971

    Re: Req. I2C Scanner

    This is the way I would do it...


    nDevices = 0
    For address = 0 To 254 Step 2
    HbStart ' send START
    HBusOut address ' send ADDR byte w/RW=0 (write)
    If PP4.0 = 0 Then ' check ACK...
  66. Replies
    6
    Views
    665

    Re: New CAN Library

    All of those devices are very old.

    How about the K80 and K83 families?
  67. Replies
    9
    Views
    498

    Re: Is XTAL available at compile time

    There are different ways to do this, and it depends on your desired result.

    If you do as you mentioned, assigning 'xtal' to a byte value like so:


    Dim b As Byte

    Dim XTAL_Speed As Byte...
  68. Replies
    9
    Views
    450

    Re: CWRITE and 18F25K50

    64 bytes is 0x40, so the block that contains 0x0C20 is:
    (0x0C20/0x40)*0x40 = 0xC00 (to 0xC3F)

    The block after that is 0xC40 - 0xC7F
  69. Replies
    9
    Views
    450

    Re: CWRITE and 18F25K50

    No, not in a single operation.

    The 64-byte block must be aligned to a write-block page boundary. You can't cross pages in a single write.
    Also, to (re)write a block it must first be erased, which...
  70. Replies
    24
    Views
    1,170

    Re: The use of USB with the 18F2550

    USB_BUS_SENSE should be connected to the USB VBUS 5V power.

    It's used to sense if you're connected to a USB host when you're powered externally (self-powered).
    If you're self-powered you really...
  71. Replies
    24
    Views
    1,170

    Re: The use of USB with the 18F2550

    There is an internal 3V3 regulator that powers the usb transceiver.
    You need to set VREGEN = 1 and put a cap on the VUSB pin (they recommend 220nF).
  72. Replies
    24
    Views
    1,170

    Re: The use of USB with the 18F2550

    What VDD are you using and what do you have connected to pin 14 VUSB?

    You would typically enable the VREGEN to get 3V3 from the internal regulator on VUSB. You don't normally need anything...
  73. Replies
    24
    Views
    1,170

    Re: The use of USB with the 18F2550

    Then you want CDC. It will act as a virtual COM port on your PC.
    You can use pretty much any terminal software on your PC that would work with a normal RS232 serial COM port.
  74. Replies
    24
    Views
    1,170

    Re: The use of USB with the 18F2550

    If you're using Win7 you'll need a .inf file to get windows to associate the CDC device with the default usbser driver and assign a virtual COM port. HID devices don't need one.

    There used to one...
  75. Replies
    11
    Views
    3,224

    Re: UART and USB Issues with PIC18F97J94

    Looking at the asm code produced for hrsout3 and hrsout4, it would appear that there's a mistake in the instruction used to access TXREGx:


    __hrsout3__
    movlb 15
    btfss PIR6,PP_TX3IF
    ...
  76. Replies
    11
    Views
    3,224

    Re: UART and USB Issues with PIC18F97J94

    I can't speak to the uart issue, but I do know there's an error on the datasheet regarding the USB memory.

    The USB BDT ram is located at 0x100-0x1FF (bank 1), not 0xD00 (bank 13) as the datasheet...
  77. Re: Advice on migrating from 16F628A to 16F18344

    According to the manual supposedly there is.

    The 16F18344 is a lot more flexible than the old chip. Instead of being stuck using a fixed comparator pin and software SERIN, you could always use the...
  78. Re: Advice on migrating from 16F628A to 16F18344

    I haven't actually used a 16F18344, but from looking at the datasheet...

    1. It appears that there's a 32MHz setting for the intosc using just the CONFIG bits, so that should be all you need.

    2....
  79. Replies
    11
    Views
    908

    Re: Dspic33Fj128MC706A UART pic18F25K80

    I think basparky is having a problem with the 18F25K80 side of things...

    That's where his HRSOUT is giving him grief... it's not sending his binary packet.
  80. Replies
    11
    Views
    908

    Re: Dspic33Fj128MC706A UART pic18F25K80

    The library routine [email protected] terminates when it sees a 0 byte in the array.

    [email protected] is called when using


    Dim StrToMain[10] As Byte

    HRSOut Str StrToMain

    ; generated asm
  81. Replies
    11
    Views
    908

    Re: Dspic33Fj128MC706A UART pic18F25K80

    I don't know if it's always been this way, but you're right... the 'STR' modifier is causing it to treat the array as a null-terminated string, and not just an array of bytes. If you want to send...
  82. Replies
    71
    Views
    11,808

    Re: Temperature Controller Problem

    main:
    If x=0 And bttn=1 Then x=1
    DelayMS 20
    If x=1 And bttn=1 Then x=0
    DelayMS 20

    If 'bttn' (PORTA.2) is depressed for more than 20ms then 'x' will never be 1 after this.
    It will be set...
  83. Re: Unable to change device using prplus.exe command-line

    I second that! I only use it when absolutely forced to, and it's always a struggle.

    On the other hand, I find MPLAB 8.92 very useful. It has a simulator included but it doesn't easily support...
  84. Re: Unable to change device using prplus.exe command-line

    I doubt that. The latest version of mpasm is v5.84 from mplabx 5.20. Perhaps you're referring to MPLAB 8.60, in which case your assembler is very old.

    Proton is currently using mpasm 5.77 (which...
  85. Re: Unable to change device using prplus.exe command-line

    Also, the .bat file posted by keytapper uses the assembler in "\Microchip\MPASM Suite", which is very likely a different version than that used by the compiler.

    On my system the assembler in that...
  86. Re: Unable to change device using prplus.exe command-line

    Thanks for confirming that.

    So when you build with mplab there's no point in using any of those options... just set the 'device=' directive?
    The manual (and plugins) still lead you to believe it...
  87. Re: Unable to change device using prplus.exe command-line

    Thanks, but your .bat file uses pretty much the same command line I'm using...
    "ProtonIDE\PDS\PrPlus.exe myfile.bas -p18F26K22 -z"

    I don't see any reason to run mpasm or mplink afterwards. PrPlus...
  88. Re: Unable to change device using prplus.exe command-line

    I got it from looking at the command line used when compiling with MPLAB.
    It uses the info in the Proton.mtc file when you install the mplab plugin.
  89. Unable to change device using prplus.exe command-line

    Does the command-line compiler support changing devices when used in free mode?
    It seems to be ignoring the '-p' command-line switch.

    When I try "PrPlus.exe myfile.bas -p18F26K22 -z" it compiles...
  90. Replies
    5
    Views
    249

    Re: Correct terminolgy

    Your first guess was right. 'unsigned integer' is exactly what it's commonly called.
  91. Replies
    6
    Views
    360

    Re: Floating point strangeness

    It would appear that it's interpreting PotVal as a signed value even though it's declared as a 'word'.
    32768 would be 0x8000, so that's the smallest signed 16-bit value (-32767) if you're using 2's...
  92. Replies
    44
    Views
    8,183

    Re: Boot loader woes.

    Do you have the 5V from the download cable connected to your board or just RX,TX and GND?
    If you do then don't externally power the board when using the cable.

    It's a very common problem to have...
  93. Replies
    6
    Views
    2,315

    Re: Proton on Arduino hardware .....

    The UMC bootloader I posted in your "bootloader woes" thread works for me with an 18F25K22, a TTL download cable, and the Proton IDE.

    I don't remember you following up with any questions/problems.
  94. Replies
    34
    Views
    7,497

    Re: i need help for 12F1571 pwm

    John,

    In that wiki article you state

    The number you show there is for 31 bits. For 23 bits the max is 2^23 - 1, which is 8388607. That drops you down to 7 decimal digits, not 9 or 10.

    That's...
  95. Replies
    34
    Views
    7,497

    Re: i need help for 12F1571 pwm

    I have no idea what that statement in the manual is trying to say.

    The 8-bit compiler uses the Microchip 32-bit float format which gives you a range of approx 1E-37 to 1E+38
    As you say, there are...
  96. Replies
    34
    Views
    7,497

    Re: i need help for 12F1571 pwm

    Make sure you're not confusing the device with the core type.
    A "12-bit device" means a 12-bit core but doesn't mean all PIC12xxxxx devices.
    The 12F1572 is a 14-bit core device... when in doubt...
  97. Replies
    44
    Views
    8,183

    Re: Boot loader woes.

    For everything to be automatic the Microcode loader needs a way of resetting the pic so that the bootloader runs.

    If you have a true RS232 setup (with a MAX232 on your board) this is done by...
  98. Replies
    44
    Views
    8,183

    Re: Boot loader woes.

    I'll try this again.

    Attached is the hex file for a umc bootloader for the 18F25K22. It is set to use the internal osc @ 16MHz and UART1 (RC6 and RC7).
    Load the hex file and program it into the...
  99. Replies
    12
    Views
    807

    Re: clear and interrupt handler - problem?

    Yes it does. It initializes the variable at the start of the main routine.
  100. Replies
    44
    Views
    8,183

    Re: Boot loader woes.

    As long as you're using a USB-TTL adapter like the CA42 you do not need to invert any of the signals, just connect TX->RX and RX<-TX (and GND of course).

    You shouldn't connect anything with a...
  101. Re: Help with ppi and def files for 24FJ256GA704

    From what I recall the 24EP/33EP family use EDS memory.
  102. Re: Wanted 18F25K22 bootloader for purchase .....

    Here's the asm and hex for an 18F25K22 umc loader. It's built for using the int osc @ 16MHz

    I haven't used it in eons but I think it works.
  103. Replies
    19
    Views
    810

    Re: PicKit4, cosa ne pensate?

    There's a command line utility for the PK4 (IPECMD), so if you can get a PK3 to work with PDS I would think you should be able to get the PK4 working as well.

    FWIW the PK3 is available for half...
  104. Re: Compile to HEX from Assembler plugin - HELP

    On my system the assembler plugin is looking for the assembler in C:\Program Files (x86)\ProtonIDE\PDS\bin\mpasmwin.exe,
    but the assembler is actually located in \ProtonIDE\PDS\Includes\mpasmwin.exe...
  105. Re: PIC24FJ256GA705 Family Devices Are They Fully Supported in Proton 24 ?

    Not really.

    There's a 6-pin SIL header that you could use an external tool to program it with (PK3/4/ICD3/4),
    but you'd' likely need MPLABX/IPE to program it.

    PICkit3Plus perhaps??? No idea...
  106. Replies
    7
    Views
    288

    Re: pic16f689 tx problem

    It looks like the formal names for the FOSC config setting are as follows (from MPASM 8bit_device.info file):


    <FOSC><Oscillator Selection bits><7><8>
    <LP><LP oscillator: Low-power crystal on...
  107. Replies
    7
    Views
    288

    Re: pic16f689 tx problem

    So you're saying that if you have the config set for INTOSCIO and


    XTAL = 8

    OSCCON = 0x70


    you don't get 8MHz (2MHz on the CLKOUT pin)?
    That's odd... I would have thought that would...
  108. Replies
    7
    Views
    288

    Re: pic16f689 tx problem

    I assume you mean INTOSC.

    The default OSCCON setting at pon is for 4MHz. Have you changed it to get 8MHz?
  109. Replies
    11
    Views
    412

    Re: Setting the A/D range to 1Volt range

    He is (parameter A20). Not only that, but all the linearity, offset, and error specs are qualified with "delta VREF = 3V".
    That's one of the reasons I didn't suggest using +/-VREF initially... there...
  110. Replies
    11
    Views
    412

    Re: Setting the A/D range to 1Volt range

    As long as your signal doesn't exceed VSS(GND) or VDD you'll be ok.

    For the other part, there's no "offset" function in the K22 ADC, so I think you'd have to do that externally. You could use the...
  111. Replies
    4
    Views
    223

    Re: High impedence opamp quesion

    In the non-inverting configuration you can pretty much ignore the resistors... the input impedance will be the impedance of the non-inverting input of the opamp.

    That's one of the advantages vs...
  112. Re: ADC alternative way to capture Data using nbuilt Fix voltage reference

    All of this would be great if the internal FVR was actually usable as a reference.

    On most devices the "reference" output is +/-6%, with about a 2% change over temperature.
    If you're using a...
  113. Replies
    5
    Views
    2,071

    Re: 18F26J50 and 18F26K53 as Hosts?

    None of the 18F's can be a USB host.. they would need to at least have USB OTG hardware, and they don't.

    Perhaps they mean that the J50 and J53 can be used as the USB keyboard device.
  114. Replies
    11
    Views
    408

    Re: PIC18F47K40 and Hserout

    If that's the case then things are going to go south very quickly.

    There's no way to manually get that right, at least not a way that won't end up causing problems later on when things change.
  115. Replies
    1
    Views
    177

    Re: maximum hbusout speed

    Not as far as I know. I2C HS mode requires different drivers on the bus lines.
    There may be a PIC32 device or two that supports it, but most standard parts don't.

    I've had success increasing the...
  116. Replies
    1
    Views
    399

    Re: SHOUT and PIC16F18877 - problem

    Since SHOUT is a bit-banged routine it doesn't use any of the SSP registers/functions.

    I'm pretty sure you need to specify PORT pins and not LAT pins so that it can calculate the TRIS register...
  117. Re: Ports not working when using PORTA = %111111

    It's not my intent to be rude, but you should pretty much ignore everything in post #5.
  118. Replies
    4
    Views
    237

    [SOLVED !] Re: Serin signal line High or Low

    For hardware, a UART input/output normally idles high.

    With RS232, the MAX232 inverts the signal.
  119. Replies
    57
    Views
    3,483

    Re: Beta Testers Wanted

    MPLAB 8.92 only supports up to the Pickit3/ICD3.

    You need MPLABX for the Pickit4/ICD4. That's a rabbit hole you probably don't want to go down if you can avoid it.
    The IPE programming app isn't...
  120. Replies
    57
    Views
    3,483

    Re: Beta Testers Wanted

    Not sure where you see that, but the K22 is still in production and isn't going anywhere. It's not THAT old!

    The K42 is a different core. If you wanted to switch to something a little more recent...
  121. Replies
    57
    Views
    3,483

    Re: Beta Testers Wanted

    Either one. You can debug at the source code level, set breakpoints, single step, view registers, watch variables, etc


    There's some info in the PDS docs about using Proton with MPLAB that talks...
  122. Replies
    57
    Views
    3,483

    Re: Beta Testers Wanted

    My suggestion would be to throw away all your simulators and software debugging packages and use the pickit along with MPLAB 8.92 to do proper hardware debugging.

    It takes a little getting used to...
  123. Replies
    13
    Views
    448

    Re: Cheap programmer or waste of money

    Supposedly not. The Pickit4 and ICD4 are supposed to have all the device programming info internal so it doesn't reload it each time you change devices.

    As you change versions of MPLABX it'll...
  124. Re: How many digit after the comma a negative float variable can take

    If you're talking about the decimal point position, it really doesn't matter much where it is until you start to approach the extreme end of the range (E+-38, or there abouts). You get 6-7 decimal...
  125. Replies
    13
    Views
    448

    Re: Cheap programmer or waste of money

    The SNAP only does low-voltage programming (LVP) so it doesn't work with many older chips or ones that have been programmed with LVP OFF.
    It also can't be used to power the target.

    Support for...
  126. Replies
    5
    Views
    1,247

    Re: Can some kind soul explain this

    The CCP module uses one of the timers as its counting resource.

    In Special Event Compare mode, the CCP will automatically reset the timer for you when the timer count matches the value set in the...
  127. Replies
    8
    Views
    253

    Re: Replace existing async with sync

    Using a scheme similar to Les's (interrupt + timer) I've been able to get a bit-banged full-duplex UART at 57600, but that was on a pic18 at 64MHz. Interrupts and timers count in your 'no peripheral'...
  128. Replies
    8
    Views
    253

    Re: Replace existing async with sync

    If that's really the requirement (no peripherals) you're going to have to use a slow protocol so that the pic has time to deal with receiving transfers.

    Adding another layer (ie USB) usually ends...
  129. Replies
    10
    Views
    306

    Re: Floating point addition problem

    Swapping an 18F1320 for an 18F26K22 doesn't change things.

    Desired calculation:
    7038600 + 1407.803 = 7040007.803



    Dim Freq As Float
    Dim BasicFreq As Float
  130. Replies
    10
    Views
    306

    Re: Floating point addition problem

    Dim frequency As Float
    frequency=7000000
    frequency = frequency +.2 ; the value of frequency will not increase if use .1 or .2 , .3 and above work ok

    I think you're just past the limits of...
  131. Replies
    14
    Views
    460

    Re: Remote programming with Pickkit2

    If you jumper the target VDD pin to the pickit USB 5V, then make sure you never plug the pickit into a USB connector while it's connected to a powered target or bad things could happen to the...
  132. Replies
    14
    Views
    460

    Re: Remote programming with Pickkit2

    The specified current limits when using the pickit to power the target are:
    PK2 25mA
    PK3 30mA
    PK4 50mA

    As Charlie says, you can usually get more than that but it's something to keep in mind....
  133. Replies
    14
    Views
    460

    Re: Remote programming with Pickkit2

    Eventually the pickit4 might be an option, but right now the programmer-to-go function isn't implemented and the SD card is non-functional.
    Also, support for older devices is sketchy.

    You didn't...
  134. Replies
    14
    Views
    460

    Re: Remote programming with Pickkit2

    It's only 15 pages, and most of it is about using different power adapters to power the PK2.

    If your question is "does the PK2 lose the program if you remove power" then the answer is no.
    The hex...
  135. Replies
    14
    Views
    460

    Re: Remote programming with Pickkit2

    The PK2 programmer to go users guide has all the details

    http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit 2 Programmer-To-Go User Guide b.pdf
  136. Replies
    4
    Views
    189

    Re: Don't care bits

    There's no way to do that George. As you say, you're stuck writing it as 0 or 1.

    Your safest bet is to set it to the state specified in the register summary, like 'U-0' for an unimplemented bit...
  137. Replies
    10
    Views
    2,009

    Re: Suggestions for pic microcontroller

    Compared to the 89S52, the 16F886 has more flash, more ram, and eeprom.
  138. Thread: 16f753 DAC

    by tumbleweed
    Replies
    11
    Views
    2,728

    Re: 16f753 DAC

    At a minumum, remove this line:


    DAC1CON0=0

    You're overwriting the setup that's done by DAC_Initialise()

    I would also leave the DAC output pin set to analog mode (but I think that may...
  139. Replies
    9
    Views
    686

    Re: Single character lines

    Thanks.

    Now I can actually read the last post!
  140. Replies
    17
    Views
    447

    Re: 18F47K40 Port B issue

    It varies with different devices, and the temperature range you're working over. You really have to look at the individual datasheet specs.

    For example, the 46K22 is spec'd +/-2% over the range 0...
  141. Replies
    17
    Views
    447

    Re: 18F47K40 Port B issue

    I'm not exactly sure what you mean by that, but you might need to clear the slew-rate register(s) SLRCONx.
    They default to slow mode and need to be set = 0 for normal speed.
  142. Re: Is PortB weak pull-out good enough for for units that requires pullout?

    It depends on the device, but the weak pullup current is usually spec'd somewhere in the range of 25uA-300uA at 5V, so that's about 200K to 16K, with 38K given as the typical value.
  143. Re: Detecting for the presence of pulses not using interrupts

    The 18FxxK40 (and some of the other newer ones) has interrupt on change on ALL pins if you want to use the same method as before.
  144. Replies
    6
    Views
    288

    Re: code improvement

    If you're talking about CREADing the settings and then having to do something like this:


    IOCON1bits_OVRENL = PwmOutputsLeft.0
    IOCON1bits_OVRDAT0 = PwmOutputsLeft.1
    IOCON1bits_OVRENH =...
  145. Re: Problem with Serial Port 1 on PIC18F47K40

    It would also help to have the declarations for the variables TEXTO_PS and P_ENVIO_BLUE
  146. Re: Hardware suggestion - stand alone (no particular compiler) debugger

    I doubt it.

    Trouble is, Mchip doesn't make the OCD (On-Chip Debugger) specification publicly available even if you wanted to do one.

    There's some reverse-engineered stuff out there, and an...
  147. Thread: Debugger

    by tumbleweed
    Replies
    7
    Views
    356

    Re: Debugger

    I'm with you as far as MPLABX goes, but MPLAB8 isn't THAT bad. At least it works, which is more than I can say about my experiences with MPLABX.

    I've used the MikroE tools in the past and had a...
  148. Thread: Debugger

    by tumbleweed
    Replies
    7
    Views
    356

    Re: Debugger

    There's not a lot to pick from. Other than the mchip tools the only ones I'm aware of are the MikroE and CCS debuggers and I'd have a hard time recommending either of them since it pretty much locks...
  149. Replies
    3
    Views
    260

    Re: Microchip assembler version?

    If you go looking for it, it's installed in the 'ProtonIDE\PDS\Includes' folder

    There you'll find the three files you need... mpasmwin.exe, 8bit_device.info, and 8bit_device.dll
  150. Replies
    3
    Views
    260

    Re: Microchip assembler version?

    The installer uses mpasm 5.77 (from mplabx 4.10)
    The most current version is mpasmx 5.82 (from mplabx 5.10)

    Compared to 5.77, 5.82 adds support for:
    PIC16F18445
    PIC16F18425
    PIC16F18444...
  151. Replies
    2
    Views
    214

    Re: Odd USART behaviour

    The compiler doesn't initialize the uart unless it sees a call to one of the HRSxxx or HSERxxx routines somewhere in the code.
    It doesn't have to be executed... it just has to see it in order to...
  152. Re: Tone detection with Goertzel's algorithm

    model B = original formula
  153. Replies
    14
    Views
    516

    Re: PIC18F1330 PLL problem

    Quoting my own post...
    That comment is wrong.. it enables the primary CLOCK, not the primary OSC.

    That's always confuses most (including me), since they use "Primary" to describe two different...
  154. Replies
    14
    Views
    516

    Re: PIC18F1330 PLL problem

    Try setting the lower two bits of OSCCON[1:0] (System Clock Select SCS1:SCS0) to 00.
    That will enable the Primary Osc (the one set by the config bits).

    It's not very intuitive, but on many chips...
  155. Replies
    7
    Views
    396

    Re: Watchdog timer

    You have to continuously execute a CLRWDT at least once before every timeout period or the watchdog will fire and reset the pic.

    You should probably start with one CLRWDT in your main program...
  156. Replies
    7
    Views
    396

    Re: Watchdog timer

    Most PICs (all?) include a builtin hardware watchdog timer module.
    You typically enable it via config settings, and tickle it with a CLRWDT instruction.

    That way you're not dependent on...
  157. Replies
    29
    Views
    2,766

    [SOLVED !] Re: Simple timer

    Dim onn As Byte

    If onn < 0 Then PORTB.1=1 ;relay off

    A 'byte' is unsigned, so it can never be negative (< 0)

    If you subtract 1 from a byte that's = 0 you'll get 0xff (255)
  158. Replies
    36
    Views
    967

    [SOLVED !] Re: Mysterious PORTB problem

    I agree with Stephan.

    Why use error-prone statements like

    Nop
    Movf PORTB,0,0
    Nop
    OldPORTBstate = WREG
    as opposed to the simpler "OldPORTBstate = PORTB".
  159. Replies
    13
    Views
    510

    Re: Convert Integers to Float

    It looks like you're mixed signed and unsigned variables in the 'results'.
    It also seems that the '//' remainder operator returns an unsigned result. Don't know if that's intended or not, but you...
  160. Replies
    13
    Views
    510

    Re: Convert Integers to Float

    I still don't understand what this macro is used for and why it's needed.

    Can you give some examples of using it where just assigning a value to a float variable doesn't work?
  161. Thread: Symbol

    by tumbleweed
    Replies
    21
    Views
    635

    Re: Symbol

    Stack underflow comes from the code in post #13, which as Rox pointed out needs to be changed to move the update sub after main or put a "goto" to jump around it.

    As written, it hits the return...
  162. Replies
    22
    Views
    642

    Re: How to pick apart a binary include file

    Maybe it's just me, but I don't see any file attached to that 2nd upload
  163. Replies
    22
    Views
    642

    Re: How to pick apart a binary include file

    hadv,

    Can you show a working example of that?

    If I try


    vendorcode:
    Include "vendor_code.bin"
  164. Replies
    22
    Views
    642

    Re: How to pick apart a binary include file

    I don't think there's any way of directly including the binary data into your source file.
    AFAIK, you'd have to translate the bin into ascii hex text, and edit it adding "CDATA" statements to get it...
  165. Replies
    22
    Views
    642

    Re: How to pick apart a binary include file

    Out of curiosity, what does the vendor say you're supposed to do with the bin file?
  166. Replies
    12
    Views
    1,292

    [SOLVED !] Re: Pulse counter memory problem

    Bob beat me to it.

    Also, if you look at your main loop...


    N=ERead 03

    main:
    If PORTA.3=0 Then EWrite 00,[N]
  167. Replies
    8
    Views
    226

    Re: EEPROM write time

    Instead of waiting a fixed amount of time, after you write it's better to wait for either PIR2.EEIF = 1 or EECON1.WR = 0.
    If you use EEIF you should clear it before writing since it remains set...
  168. Re: Why stays a part of RAM empty when I turn on RC1IE (18F45K40)?

    Context Save
    GIE = 0 ;- Interrupts in the interrupt-routine OFF for a moment
    PEIE = 0 ;/

    Verder:
    PEIE = 1 ;\
    GIE = 1 ...
  169. Replies
    3
    Views
    171

    Re: Help With I2C and Lidar ?

    I don't have one of those to try, but looking at the datasheet the I2C operations look like they should be:
    Use I2COut to set register addresses and send data
    When you use I2CIn to read, you must...
  170. Replies
    9
    Views
    356

    Re: Assembler to Proton

    I think that looks something like this...


    Dim cap1 As Word
    Dim cap2 As Word
    Dim flags As Byte

    iserv:
    If flags.0 = 0 Then ' 1st capture flag set?
    flags.0 = 1 ' no, set 1st...
  171. Re: 16F15345 Won't Assemble (but does compile)

    I can think of a few nasty kludges, but since you had to define some of the register symbols it looks like the libraries need some work for that device.

    One thing you could try as an experiment is...
  172. Re: 16F15345 Won't Assemble (but does compile)

    You shouldn't have to unlock the PPS or enable any of the PIE settings.

    It seems that when you use HRSIN and specify a timeout it's not looking in the proper register for RCIF... it's assuming...
  173. Replies
    103
    Views
    1,832

    Re: Malware on this website?

    Doesn't the Search Console assist in identifying the issue before submitting it for review?
  174. Replies
    103
    Views
    1,832

    Re: Malware on this website?

    Their diagnostics aren't that helpful, either

    http://google.com/safebrowsing/diagnostic?site=http://www.protonbasic.co.uk/
  175. Re: Best choice, 18F26K22 or 16F18857 for Mat/Calc. IOC Edge trigger?

    That's a really good point, George, and one worth pointing out.

    In my experience, the code sequence


    High PORTB.4
    High PORTB.5

    Actually writes to the LAT registers (uses a "bsf LATB", no...
  176. Re: Best choice, 18F26K22 or 16F18857 for Mat/Calc. IOC Edge trigger?

    So it's not a RMW effect, otherwise PORTB.4 and PORTB.5 wouldn't both be high.

    If it were RMW, the solution is to write to the LATB register instead of the PORTB register.
    Write to the LAT, read...
  177. Re: Best choice, 18F26K22 or 16F18857 for Mat/Calc. IOC Edge trigger?

    On the 26K22 PORTB.0 is an analog pin, so it'll always read '0' if it hasn't been switched to digital mode...
  178. Re: Has anyone code to set up a firewing board 18f... to talk via the USART/USB?

    Here's a little echo program that I just ran on the FW18 board programmed via the icsp (PK3)


    Device = 18F26K22
    Declare Xtal = 64

    Config_Start
    ; CONFIG1H
    FOSC = INTIO7 ; (FOSC)...
  179. Re: Has anyone code to set up a firewing board 18f... to talk via the USART/USB?

    These are the settings from an old Swordfish program running on the firewing board


    device = 18F26K22
    clock = 64

    config
    // CONFIG1H
    FOSC = INTIO7, // (FOSC) = [LP, XT, HSHP,...
  180. Re: Has anyone code to set up a firewing board 18f... to talk via the USART/USB?

    Sorry, Tim. Not in Proton.

    I probably have some Swordfish code for a K22 floating around somewhere if that would be of any help...
  181. Re: Has anyone code to set up a firewing board 18f... to talk via the USART/USB?

    The interface between the main 18F and the USB uC (18F14K50) is pretty much just a uart setup for 38400.

    One think to note... if you're using the stock firmware in the 14K50 it uses the terminal...
  182. Replies
    4
    Views
    204

    Re: Trying to set ORG

    How about


    Org ((($>>4)+1)<<4)
    CData 1, 2, 3, 4


    Seems to work ok...
  183. Re: How should I handle a watchdog timer reset?

    Except for the few registers that don't get initialized, there's essentially little difference between the different forms of reset. Your code will restart just as it would at powerup, so all the...
  184. Replies
    1
    Views
    159

    Re: Pic serial synchronous DTMF to HT9200A

    The datasheet doesn't say what the data setup time before the clock edge is, so I'd try add a delay between setting the data and the falling clock edge...


    Low PORTC.4 'set data ...
  185. Replies
    16
    Views
    786

    Re: Driving SK9822 or APA102 RGB LED's

    The SK9822 and APA102 are infinitely easier to deal with than the WS2812.

    All you need to do is send out a few bytes of SPI data at just about any reasonable frequency... none of the timing woes...
  186. Replies
    11
    Views
    501

    Re: Timer1 overflows

    I think you can leave those NOPs out.

    I don't see where you've ever written to the T1CON register to set up the timer or turn it on.
  187. Replies
    5
    Views
    209

    Re: 18F26K42 Eeprom anyone?

    That's a microchip marketing scam.

    The 18F has ram banks just like all the other chips, unless you want to use the FSR registers to access memory indirectly. THEN it's "linear".
  188. Replies
    5
    Views
    425

    Re: Question for C/C++ and VB programmers

    In C, If you want to modify the callers variable then you have to pass a pointer to the thing you want to modify, not the value...


    // pass function a pointer to an int
    myfunct(int *b) {
    //...
  189. Replies
    9
    Views
    756

    Re: 18F26K80 SPI SHout support

    I'm a version or two behind, but I noticed that in mine the xxK80.def files seem to have the ANCON0/ANCON1 setting around the wrong way, hence why I suggested setting them to 0.

    I don't know how...
  190. Replies
    9
    Views
    756

    Re: 18F26K80 SPI SHout support

    I don't know how you're setting the analog/digital mode of the pins, but try adding


    ANCON0 = 0
    ANCON1 = 0
    to the beginning of your program and see if SHOUT works. That'll force the pins to be...
  191. Replies
    8
    Views
    480

    Re: Serout pace time and stopbit setings

    You sure got that right, George.

    Bit-banged async input is almost always a recipe for disaster.
  192. Replies
    8
    Views
    480

    Re: Serout pace time and stopbit setings

    For serial input it really doesn't matter if the sender is using 2 stop bits or not... you'll receive the data just fine with the RX set to 1 stop bit.
  193. Replies
    41
    Views
    4,592

    Re: 18F24k20 Handbrake Stuck

    Not to get in Alberto's way, but a few things to look out for:

    Set PPS1WAY = Off in the CONFIG block

    And for a possible solution to your lookup problem-


    Symbol SEGMENTS = PORTB 'PORTTB...
  194. Replies
    41
    Views
    4,592

    Re: 18F24k20 Handbrake Stuck

    There's no OSCCON, but there is OSCCON1 which is somewhat similar.

    Look at table 4-1. The CONFIG setting
    RSTOSC = HFINTOSC_1MHZ ;HFINTOSC with HFFRQ = 4 MHz and CDIV = 4:1starts you off with:...
  195. Replies
    7
    Views
    463

    Re: Preprocessor output to assembler

    Not sure if this is what you're after or not, but after you compile if you hit F2 it'll open an assembly window with the output results.
  196. Replies
    12
    Views
    815

    Re: Slightly surprised by 18F26K22

    No, it's not going to hurt anything.

    If you're using the pin as an output then the 4.7K pulldown likely won't change much... just add a little more loading, so another mA or so of current out of...
  197. Replies
    12
    Views
    815

    Re: Slightly surprised by 18F26K22

    Depending on what you're doing keep in mind there's a 4.7K pulldown resistor on the PGC/PGD lines of the pickit2, pickit3, and ICD3.
  198. Replies
    20
    Views
    1,297

    [SOLVED !] Re: Problem in pulse per second meter

    If you setup the display scanning to be done by a timer interrupt, the display will be pretty much rock solid and won't vary.
    TMR2 is probably the easiest since you can set it up and it'll run...
  199. Replies
    8
    Views
    720

    Re: Problem with PIC16F18326

    There seems to be an error in the P16F18326.ppi file.

    The two entries:

    TRISA EQU 0X0080
    TRISC EQU 0X0082

    Should be:

    TRISA EQU 0X008C
  200. Thread: Tris

    by tumbleweed
    Replies
    11
    Views
    575

    Re: Tris

    I dunno George. I don't have any good ideas.

    You can read the PORT reg and get the current state of the pins, but much past that I think you're sorta SOL.
Results 1 to 200 of 529
Page 1 of 3 1 2 3