September 29, 2019, 5:39 am
I'm playing around with the idea of writing a SCPI-parser. I need to match an incomming string to a series (could be dozens or hundreds) commands/keywords. For example an incoming string might look like
OUTP:CH1 ON or
MEAS:CURR:DC? so I need to create a list of all the keywords and then try to figure out which (if any) matches what's in the incomming string.
My idea is to use the db directive to store the keywords as null-terminated strings, like so:
Code:
ASM
Keywords
db "OUTP", 0
db "MEAS", 0
db "CURR", 0
db "VOLT", 0
db "AC", 0
db "DC", 0
db "ON", 0
db "OFF", 0
ENDASM
Obviously way simplified but it serves as an example.
I can use the EXT modifier to "get" the address in FLASH where the table
Keywords starts and then use
READCODE to get a char at the time and match against my incomming string. But as soon as a char doesn't match I'd rather not continue to the NULL of that keyword but instead jump to the start of the next keyword.
For that I think I'll need another table holding the addresses of where EACH keyword starts but I can't seem to figure out a way to build that table "automatically". I suppose I could do it at runtime and use WRITECODE to store it back into FLASH on the very first time the code executes but ideally I'd like the assembler (or pre-processor) to create that table for me and put it somewhere in FLASH where I can read it with READCODE.
Does that make sense? Any ideas of how to achieve this? Or, for that matter any ideas in general on how to perform string matching would be welcome!
/Henrik.
↧
September 30, 2019, 9:56 am
Is it just me or is there something going on with the forum?
If I'm not logged in I can get to the "home page" where I can see new posts in the left column but if I click on anyone of them all I get is a blank page. Same thing if I click "What's New" at the top. I can search the forum and get presented with the usual (more or less relevant) results to my query but if I click on one of them all I get is that blank.
If I'm logged in it seems to be working though.
/Henrik.
↧
↧
October 3, 2019, 10:39 pm
↧
October 11, 2019, 7:06 am
Wow, One would think every body is on Vacation or raking up leafs or preparing for winter. There hasn't been any new post's on either this site or the ME Labs forum in weeks. I guess every body has all of there PIC projects under control. I suppose that's a good thing. Well, back to the bench myself. I just received from Crownhill some Amicus 18 boards for $.99 each and am in the process of getting them programmed. Now I just need to find some of the Color LCD displays for there shield's which I also bought for $.99 each. The Amicus 18 boards are ideal as they have ALL of the port pins in a logical order on there Arduino style board's. I plan on populating them with 18F27K40's for a few of the projects here. I have used there boards for some development projects at my former employer TRW/ZF about 2 or so years ago. It's too bad they are discontinuing them.
↧
October 16, 2019, 5:09 am
The Siemens MC35i Terminal Board is a robust unit with integrated GPRS and Dual-Band GSM functionality.
It allows your project to utilise the full benefits of GPRS technology, such as permanent online connections plus cost-efficient, high-speed data transmission.
These small low power units require DC power and a SIM card
↧
↧
October 16, 2019, 5:12 am
Siemens MC35i Documentation
The Siemens MC35i Terminal Board is a robust unit with integrated GPRS and Dual-Band GSM functionality. It allows your project to utilise the full benefits of GPRS technology, such as permanent online connections plus cost-efficient, high-speed data transmission.
↧
October 20, 2019, 7:30 am
Hello
the pic18f45k50 stuck when i detached it from the usb (pc).
the software running hid keyboard and uart keyboard , how i can detect if the pic18f45k50 Attached/detached to usb pc ?
Eyal
↧
October 20, 2019, 4:53 pm
Anyone here using the ESP8266 module?
↧
October 21, 2019, 2:50 pm
Anyone tried compiling a PIC18F26K83 or PIC18F25K83 with the latest PBP3.1? I'm getting ASM errors for *everything* ie. all code when compiling. This doesn't happen for any of the older supported PICs.
I didn't update my MPASM stuff during the upgrade to PBP3.1 so maybe that's causing it?
Troy
↧
↧
October 24, 2019, 12:26 am
I have to log my PIC measurement data from a point with no internet, phone line or ability to have a cable.
So, the only available solution seems to be the GPRS modem. But since these are not point to point, a server is needed I guess.
Anyone with experience on this? On the server what software should be running to relay the data? Are there free services for low quantity of data?
Any help appreciated.
Ioannis
↧
October 24, 2019, 6:19 am
Hello, I'm in attempt of making VFD clock and want to use as few parts as possible. Anyone had chance using these IC with PBP?
↧
October 27, 2019, 2:39 pm
I have 2 flavours of PIC that claim to produce a port output rise to fall (and vice versa) time of 5-6ns – well, the 18F26K83 claims it will theoretically produce it with slew rate disabled. Scoping both the 18F26K83 & 18F27J53 yields a fall to rise time of about x10 that and a rise to fall that’s a similar order of magnitude more. Also tried loading the pin as per the recommendations in the 18F27J53’s DS.
Anyone else experienced similar disappointment with this or have advice to share?
Thanks,
Troy
↧
October 28, 2019, 3:32 pm
Just say I have a FET with a transfer characteristics chart that says that the FET wont be transferring any current with a Gate-Source voltage up to 5V and will be effectively fully open with a Gate-Source Voltage of 10V and just say I wanted to drive the FET directly from a 5V capable PIC processor and assume that the Collector-Source voltage of the FET will be 50V ie. there will be 50 available volts on the rails to tap off.
My current thought process would be to bias/lift the PIC up 5V with 2 voltage regulators a 10V positive one for Vdd and a -5V negative one referenced to the 10V positive reg for Vss?
Can anyone see any issues with that or better suggestions?
Thanks,
Troy
↧
↧
October 31, 2019, 11:40 am
During the ZX Spectrum times, we had to use very tight timing, to achieve non-usual graphics effects, which where in theory, not possible on that hardware. I tried same approach to 1602 LCD :D
This is standard 1602 LCD, just inverse display (but this works with normal LCD's too). No hardware mods, not using user accessible ram for this. Guess how that effect was achieved? :)
https://youtu.be/1-TSWFjJ9sk
↧
November 2, 2019, 2:03 pm
I am trying to use the MCC configurator.
Up to this moment I have created an *.mc3 file. What next?
Seems this is some kind of markup language file and I cannot read it or import it to PBP editor.
Or in MPLAB-X, should this be imported to the project? How?
Ioannis
↧
November 4, 2019, 11:30 am
On some PIC's one can define the CONFIG bits by this syntax (for example on the 18F45K22):
Code:
#CONFIG
CONFIG FOSC = INTIO67 ; Internal oscillator block
CONFIG PLLCFG = ON ; PLL Control
CONFIG PRICLKEN = OFF ; Primary clock can be disabled by software
CONFIG FCMEN = OFF
etc
but on others, like the 16F19176 needs this type of syntax:
Code:
#CONFIG
__CONFIG _CONFIG1, _FEXTOSC_OFF
__CONFIG _CONFIG1, _RSTOSC_HFINTPLL
etc
Anyone knows why?
And then it gives me Overwriting previous address contents (8007)...
Testing on PBP 3.1.2.3 and MPASMX of the 5.15 MPLABX
Ioannis
↧
November 4, 2019, 11:36 pm
this is a test , Admin logged in as user cemati
↧
↧
November 5, 2019, 2:15 am
↧
November 6, 2019, 6:32 am
Hello everybody,
I am using a pressure sensor from MEAS, connected to a PIC 18F2685.
This sensor delivers some calibraton data and some intermediate results on an I2C bus and the PIC needs to do some additional computation to get the pressure in mBar.
A complex step is the temperature compensation which requires some computation with 64 bits signed long variables.
I use the LONG options in PBP Pro which provides me with the capability to process 32 bits long variables but I cannot see any solution for 64 bits.
I can try to cut my 64 bits variables in 32 bits intermediate variables, make some shifts, BYTES movements etc... but it will be a very hard and tricky way.
Does anybody have a good idea ?
Thank you for your help
MikeBZH
↧
November 6, 2019, 12:26 pm
Hi.
I am using rc 522 chip rfid module. I can read test data. Now, I want read rfid card. Which register do I need to change to read the cards?
↧