Quantcast
Channel: MEL PICBASIC Forum
Viewing all 4747 articles
Browse latest View live

receive and display strings

$
0
0
Hi to all ,

I have an off the shelf unit that send information over the serial link at 9600 / 8 / n1.
Actually I display that information on a PC serial terminal but now I want to send them to a LCD connected to the PIC instead.
The info appears as follows on the terminal:

T=22.8 C
RH=64%
dew=15.5 C
Temp: 23.97 C
Prss:972.33 mB

I do not know how to receive them and send them to the LCD. I think they are transmitted as strings...
How could I do that please ?
Thanks for all
regards.

test

How to detect USB Attached/detached

$
0
0
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

ASM Errors with the PIC16F19156

$
0
0
Hi, I'm trying to work on a project with the PIC16F19156 chip. At this point I'm just trying to get an LED blinking. For some reason, I'm getting a bunch of ASM errors. The compiler is not finding the processor. I'm using PBPX version 3.1.2.4. Below are the errors that I'm getting. Any help is appreciated. Thanks.

Code:

Error[132]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 11 : Unknown processor (16F19156)
Error[105]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 12 : Cannot open file (Include File "P16F19156.INC" not found)
Error[131]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 29 : Processor type is undefined
Error[131]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 30 : Processor type is undefined
Error[131]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 31 : Processor type is undefined
Error[131]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 32 : Processor type is undefined
Error[131]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 33 : Processor type is undefined
Error[113]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 139 : Symbol not previously defined (PORTB)
Error[113]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 141 : Symbol not previously defined (PORTC)
Error[113]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 143 : Symbol not previously defined (TRISB)
Error[113]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 145 : Symbol not previously defined (TRISC)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1322 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1322 : Illegal opcode (INIT)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6682 : Illegal opcode (clrf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6683 : Illegal opcode (movwf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6684 : Illegal opcode (movlw)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6685 : Found label after column 1. (addwf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6685 : Illegal opcode (R1)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6686 : Found label after column 1. (btfss)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6686 : Illegal opcode (STATUS)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6687 : Found label after column 1. (addwf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6687 : Illegal opcode (R1)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6688 : Found label after column 1. (btfss)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6688 : Illegal opcode (STATUS)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6689 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6689 : Illegal opcode (DUNN)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6690 : Found label after column 1. (movlw)
Error[108]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6690 : Illegal character (()
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6691 : Found label after column 1. (movwf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6691 : Illegal opcode (R0)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6692 : Found label after column 1. (movlw)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6692 : Illegal opcode (low)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6693 : Found label after column 1. (call)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6693 : Illegal opcode (PAUSEUSL)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6694 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6694 : Illegal opcode (pauseloop)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6739 : Illegal opcode (clrf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6740 : Illegal opcode (addlw)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6741 : Found label after column 1. (movwf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6741 : Illegal opcode (R0)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6742 : Found label after column 1. (comf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6742 : Illegal opcode (R0)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6743 : Found label after column 1. (movlw)
Error[108]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6743 : Illegal character (-)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6744 : Found label after column 1. (btfss)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6744 : Illegal opcode (STATUS)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6745 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6745 : Illegal opcode (pauseush)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6746 : Illegal opcode (addwf)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6747 : Found label after column 1. (btfsc)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6747 : Illegal opcode (STATUS)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6748 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6748 : Illegal opcode (pauseusloop)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6749 : Illegal opcode (addwf)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 536 : Found label after column 1. (clrwdt)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6751 : Found label after column 1. (incfsz)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6751 : Illegal opcode (R0)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6752 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6752 : Illegal opcode (pauseusloop)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6753 : Found label after column 1. (btfsc)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6753 : Illegal opcode (R0)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6754 : Found label after column 1. (goto)
Error[108]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6754 : Illegal character ($)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6755 : Found label after column 1. (btfss)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6755 : Illegal opcode (R0)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6756 : Found label after column 1. (goto)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6756 : Illegal opcode (pauseusdone)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6757 : Found label after column 1. (nop)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6758 : Found label after column 1. (goto)
Error[108]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6758 : Illegal character ($)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 6759 : Illegal opcode (return)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 8078 : Illegal opcode (movlb)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 536 : Found label after column 1. (clrwdt)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 8080 : Illegal opcode (return)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (TRISA)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (TRISA)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1067 : Found label after column 1. (clrf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1067 : Illegal opcode (TRISA)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (ANSELA)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (ANSELA)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1067 : Found label after column 1. (clrf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1067 : Illegal opcode (ANSELA)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (PORTA)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (PORTA)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1089 : Found label after column 1. (bcf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1089 : Illegal opcode (PORTA)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1069 : Found label after column 1. (movlw)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1069 : Illegal opcode (low)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1070 : Found label after column 1. (movwf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1070 : Illegal opcode (R1)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1052 : Found label after column 1. (movlw)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1052 : Illegal opcode (low)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 854 : Found label after column 1. (movlp)
Error[108]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 854 : Illegal character (()
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 856 : Found label after column 1. (call)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 856 : Illegal opcode (PAUSEL)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (PORTA)
Error[113]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 735 : Symbol not previously defined (PORTA)
Warning[207] C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1087 : Found label after column 1. (bsf)
Error[122]  C:\PROGRAM FILES (X86)\PBP3_1\PBP_PIC16F1XXXX_TRIS_OFFSET.LIB 1087 : Illegal opcode (PORTA)
Error[131]  C:\PBP3-PROJECTS\TESTING-PIC16F19156.ASM 209 : Processor type is undefined

OLED display 0.42" 70x40

$
0
0
Hello All,

recently I bought an OLED display's, size 0.42" 70x40 pix. driver SSD1306 https://www.gmelectronic.com/oled-di...0x40-i2c-white. I try to run it on Richard's includes for SSD1306 oled's, but no success obviously, because this include is not written for these oled's. My question is, it is possible to modify the include to drive this size oled?

Thanks, Louis.

Forum Advertising

$
0
0
Regarding the adverts, sorry, I really hate them too.

However having been providing a discussion forum for melabs picbasic for many years (from 1997), I now find that sales revenue from the product is so low - near non existent , especially sine there is no renewal revenue- that to justify continuing to provide this service - without charge to the users - I have to raise revenue via advertising. Google seems to be the least intrusive option, That actually works.

Having said that, you DO have control over the ads that you see - one of the great benefits of googles system -


Change the ads you see

  • At the top right of an ad, select Remove Remove and then Stop seeing this ad.
  • At the top right of an ad, select Remove Remove and then Report this ad.
  • You can also let me know about ads that are offensive or inappropriate and i can block them via my google control panel.

Turn off personalized ads

  1. Go to the Ad Settings page.
  2. Choose where you want the change to apply:
    • On all devices where you’re signed in: If you aren't signed in, at the top right, select Sign in. Follow the steps.
    • On your current device or browser: Stay signed out.
  3. Turn off Ad Personalisation.
You can also turn off personalisation for your browser by installing the Interest-Based Ads Opt Out extension.

Once you've turned off personalisation, Google will no longer use your info to personalize your ads. Ads can still be targeted with info like your general location or the content of the website you’re visiting.

Stop getting personalized ads on non-Google websites & apps

  1. Go to the Ad Settings page.
  2. Uncheck the box next to "Also use your activity & information from Google services to personalize ads on websites and apps that partner with Google to show ads."

What doesn't change

Blocking a Google ad or turning off ad personalisation can't:

  • Stop all ads: If you turn off personalisation, Google ads will use info like your general location or the content of the website you’re visiting.
  • Change other networks' ads: Your Google ad settings don’t change other ad networks.
  • Update your settings on signed-out devices: Learn how to get your ad preferences on all your devices.
  • Keep your signed-out preferences without cookies: If you delete your cookies or use a browser that blocks cookies, your ad settings won’t apply.
    • To clear your cookies without losing your settings, install the Protect My Choices extension.
    • Most mobile devices don't use cookies. On your phone or tablet, check for settings about interest-based ads, ads personalisation, or ad identifiers.

Advertisment placement

$
0
0
There should be NO adverts withon forim posts from later today. Adverts should always appear OUTSIDE of the text of a post within the forum. If you are seeing adverts withon the post test, please let me know, by posting here, WITH a SCREEN shot .

Auto Log Out

$
0
0
Users have reported that if RememberMe is not checked at login, they are constantly logged out

Your login status relies on cookies stored by the browser on your device.
Logins will not be shared across devices or browsers.
Logging out on one device will not log you out of others.


You will likely be logged out if -
  1. You block our cookies from the server.
  2. Our Cookies are deleted from the device.
  3. The cookieies we deliver are tempered with.
  4. You have not selected "Remember Me" on the front-end because we are running behind a proxy (i.e. Cloudflare) and the reported IP Address changes.
  5. If you are inactive longer than the Cookie Timeout value and you have not clicked "Remember Me". This is 3600 seconds on our system.
  6. You block JavaScript for any reason.
Item 4 is the likely cause of logout issues if you have recently noticed it happening and you did not expierience it before. We moved to the cloudflare service in November 2019

Select "Remember Me" at login and the issue will cease.

What Is Cloudflare and Why we are using It?


Cloudflare is a free CDN type product that protects against threats such as SQL injection and identity theft.
Cloudflare also improves site performance and speeds up loading times by using their multiple data centers that are located around the world.


The Cloudflare network acts like a giant VPN. This means that a site visitor will access our website by being physically redirected to the closest server. What this means is simple: the closer the data center, the faster our website will load for you. This is unique to Cloudflare.

Another benefit is the reduction of bot crawls, which can be both helpful and harmful depending on their source. A bot crawl is typically used to go to websites and “crawl” for information on our web pages. While these can be helpful when catching content thieves using our website design without permission, they can also generate false ad impressions, inject spam and malware through file backdoors, stealing website content and information.

A good way to think about Cloudflare is to think of it as a web proxy.
Because a cache of our website is available to you, Cloudflare is able to block suspicious content and keep you safe from malicious viruses, spambots and harmful traffic flow.




Here’s how it works:

In the early days of the Internet, when you wanted to load a website, your request would go from your computer to a server, which would then return the web page you requested.

If too many requests came in at once, that server could be overwhelmed and crash, becoming unresponsive to anyone trying to access the resources it hosted.

This made it difficult for owners of Internet properties to provide content that was fast, safe, and reliable. Cloudflare was created to ease these difficulties and empower users with the resources to make their sites, apps, and blogs safe and performant. This is done through the use of a powerful edge network that provides content and other services as close to you as possible, so you get the information as fast as possible.

You see, Einstein figured out some time ago that the speed of light is a hard upper limit on how fast you can communicate; there comes a point when the only thing you can do is move the content and computation closer! That’s why Cloudflare put 194 data centers all across the world: to give you what you’re looking for quickly!


Cloudflare also provides security by protecting Internet properties from malicious activity like DDoS attacks, malicious bots, and other nefarious intrusions.

Cloudflare provide security and performance for over 20 million Internet properties and offer great functionality such as SSL and content distribution to every website on our network.


Their services run silently in the background, keeping many of the websites and services you depend on up and running.

Your Internet provider, and anyone else listening in on the Internet, can see every site you visit and every app you use — even if their content is encrypted. Cloudflare offers a free DNS service called 1.1.1.1 that you can use on any device. Cloudflare’s 1.1.1.1 protects your data from being analysed or used for targeting you with ads.





Maybe you missed this bit ----> Cloudflare offers a free DNS service called 1.1.1.1 that you can use on any device <----

Yes, you should consider moving your DNS to 1.1.1.1

DS3231 replacing a DS1307 Possible ???

$
0
0
Quick search for comments.....

Looking to replace a DS1307 RTC with a DS3231. Wondering if code will need changing any ??

Thoughts ?

Thank you for reading

Andy

CAN library

$
0
0
Hello Friends,

Could you advise please if CAN library exist for PBP3? I had some great and enjoyable experience with PBP3 in the past and now coming back with CAN communication project and would like to keep using PBP3 if possible.

Thank you

Lcd menu with keypad problem

$
0
0
I have a problem with my menu integration. I am currently using keypad to switch menu sections like when I press 'A' on keypad go to a sub-menu or press 'B' to go another sub-menu, when I press '*' inside of these sub-menus then go back to main menu.
I don't have any problem about going to sub-menus when program started but after I press '*' to go to main menu, I can't go back to any of sub-menus.

The code is as following:
Code:
char K;

char T;

void MainMenu()
{
do
{
K = kbd_getc();
T = K - 48;
lcd_gotoxy(1,1);
printf(lcd_putc,"A)MOD B)SET HOUR");
delay_ms(5);
if((K=='A') || (K=='B') ||(K=='C') || (K=='D'))
{
printf(lcd_putc,"\f U is zero now");
U=0;
}
}while(U==1);
}

void AltMod()
{
lcd_gotoxy(21,1);
printf(lcd_putc, "\fPRESS * FOR MAIN MENU\n");
delay_ms(5);

lcd_gotoxy(1,2);
printf(lcd_putc,"ENTER NUM=>\n");
}

void AltModRun()
{
do
{
K = kbd_getc();
T = K - 48;
if((K!=0) && (K!='A') && (K!='B') && (K!='C') && (K!='D')&& (K != '*') && (K != '#'))
{
A = (A*10) + T;
//Don't add Y=20 here, it resets it to 20 in every cycle
Y++;
lcd_gotoxy(Y,1);
printf(lcd_putc,"PRESS # FOR SUBMIT %d",T);
delay_ms(5);
}
if(K=='#')
{
num= A;
lcd_gotoxy(21,2);
printf(lcd_putc,"%d NUM IS CHOSEN", num);
delay_ms(5);
}

if(K == '*')
{
printf(lcd_putc,"\fINSIDE MOD STAR");
Y=20;
Z=0;
A=0;
}
}while(Z==1);


void main()
{
kbd_init();

port_b_pullups(true);

set_tris_b(0xF0);

rtc_init();
lcd_init();
MainMenu();//To display Main menu when program starts

while(true)
{
K = kbd_getc();
T = K - 48;

switch(K)
{
case 'D':
Z=1;
AltMod();
AltModRun();
break;

case '*':
U=1;
printf(lcd_putc, "\fINSIDE CASE STAR");
//MainMenu();
break;
}
}
}

If there is only printf inside case '*' then program works as I want, but when I comment out the printf and put MainMenu(); in there then it doesn't go to anywhere after I press '*', it keeps displaying main menu.

In program's first execution, when I press 'D' then it goes to sub menu, when I press * it goes back to main menu but while in main menu it doesn't go to sub menu when I press A,B,C or D, it only goes to sub menu when I press one of these keys around 20 times.

Lcd menu with keypad problem

$
0
0
I have a problem with my menu integration. I am currently using keypad to switch menu sections like when I press 'A' on keypad go to a sub-menu or press 'B' to go another sub-menu, when I press '*' inside of these sub-menus then go back to main menu.
I don't have any problem about going to sub-menus when program started but after I press '*' to go to main menu, I can't go back to any of sub-menus.

The code is as following:
Code:

char K;

char T;

void MainMenu()
{
do
{
K = kbd_getc();
T = K - 48;
lcd_gotoxy(1,1);
printf(lcd_putc,"A)MOD B)SET HOUR");
delay_ms(5);
if((K=='A') || (K=='B') ||(K=='C') || (K=='D'))
{
printf(lcd_putc,"\f U is zero now");
U=0;
}
}while(U==1);
}

void AltMod()
{
lcd_gotoxy(21,1);
printf(lcd_putc, "\fPRESS * FOR MAIN MENU\n");
delay_ms(5);

lcd_gotoxy(1,2);
printf(lcd_putc,"ENTER NUM=>\n");
}

void AltModRun()
{
do
{
K = kbd_getc();
T = K - 48;
if((K!=0) && (K!='A') && (K!='B') && (K!='C') && (K!='D')&& (K != '*') && (K != '#'))
{
A = (A*10) + T;
//Don't add Y=20 here, it resets it to 20 in every cycle
Y++;
lcd_gotoxy(Y,1);
printf(lcd_putc,"PRESS # FOR SUBMIT %d",T);
delay_ms(5);
}
if(K=='#')
{
num= A;
lcd_gotoxy(21,2);
printf(lcd_putc,"%d NUM IS CHOSEN", num);
delay_ms(5);
}

if(K == '*')
{
printf(lcd_putc,"\fINSIDE MOD STAR");
Y=20;
Z=0;
A=0;
}
}while(Z==1);


void main()
{
kbd_init();

port_b_pullups(true);

set_tris_b(0xF0);

rtc_init();
lcd_init();
MainMenu();//To display Main menu when program starts

while(true)
{
K = kbd_getc();
T = K - 48;

switch(K)
{
case 'D':
Z=1;
AltMod();
AltModRun();
break;

case '*':
U=1;
printf(lcd_putc, "\fINSIDE CASE STAR");
//MainMenu();
break;
}
}
}

If there is only printf inside case '*' then program works as I want, but when I comment out the printf and put MainMenu(); in there then it doesn't go to anywhere after I press '*', it keeps displaying main menu.

In program's first execution, when I press 'D' then it goes to sub menu, when I press * it goes back to main menu but while in main menu it doesn't go to sub menu when I press A,B,C or D, it only goes to sub menu when I press one of these keys around 20 times.

Attachments

$
0
0
Are attachments working? can tyou see attachments? or do they ALL display as a number rather than an image

FN-M16P wow's

$
0
0
I was wondering if any body here has worked with an FN-M16P dvr before? I have recorded some numbers and messages for an upcoming project and noticed an unacceptable delay after sending the control string to the unit. The delay is in the order of 100 to sometimes 1000 Milliseconds. When building a string of numbers to announce a numeric value the delay is unacceptable. I am looking at the Busy signal as to when to send the next string after the utterance and on the scope I can see the delay before the busy pin goes Low. The busy pin is low during the utterance and when it return to a high level the unit is in Idle. I have an email in to the manufacture but no reply as of yet. I was wondering if I am doing something wrong, but I have followed all of the documentation.

p10 16x32 rgb led matrix

$
0
0
i have been fiddling around with one of these p10 16x32 rgb led matrix modules
eg
https://nl.aliexpress.com/item/32382...20184a1dvBgHZN




don't be confused by 1/8 scan ones like i thought i had purchased, it took a few attempts for
the penny to drop why it would not work properly as 1/8 scan. turns out its 1/4 scan


here's some examples trying out a few methods of driving them in simple 1/4 scan 8 colour mode


first go
1 nibble/pixel frame buffer (fb) mapped as rows 0-7 low nibble 8-15 high nibble
Attachment 8840




second go
1 bit/pixel/colour fb mapped as rows 0-15 bits 0-31 / row
Attachment 8841


then
double buffering fb to a output buffer in scan interleave order


Attachment 8842
progressing
along to as an isr background task


the bit/pixel stuff is pretty close to compatable with glcd type graphics
if done once for each colour


some examples in last file
Attached Images
    
Attached Files

16F18855 - HPWM and some ports with troubles

$
0
0
I have a big dilemma: why PORTA.4 and PORTC.2 not work only when I use HPWM ? I tried with another basic compiler and work right. Its a PBP bug software or something is missing in my registry config? I saw the older PBP versions had some problems with HPWM.
I have installed the 3.1.2.4. PBP version . The rest of pins work right ! Somebody had a trouble like this ?
Thank you !

Code:

#CONFIG    __config _CONFIG1, _FEXTOSC_OFF & _RSTOSC_HFINT32 & _CLKOUTEN_OFF & _CSWEN_OFF & _FCMEN_OFF
    __config _CONFIG2, _MCLRE_OFF & _PWRTE_OFF & _LPBOREN_OFF & _BOREN_OFF & _BORV_LO & _ZCD_OFF & _PPS1WAY_OFF & _STVREN_ON & _DEBUG_OFF
    __config _CONFIG3, _WDTCPS_WDTCPS_11 & _WDTE_OFF & _WDTCWS_WDTCWS_7 & _WDTCCS_LFINTOSC
    __config _CONFIG4, _WRT_ON & _SCANE_available & _LVP_OFF
    __config _CONFIG5, _CP_ON & _CPD_OFF
#ENDCONFIG


'---set 4MHz---
DEfine  OSC 4
OSCFRQ  =  %00000010 'set 4MHz ;  RSTOSC = HFINT32


TRISA  = %00000110
ANSELA = %00000110
PORTA  = %00000000
TRISB  = %00000000
ANSELB = %00000000
PORTB  = %00000000
WPUB  = %00000000
TRISC  = %00000000
PORTC  = %00000000
ANSELC = %00000000
LATC  = %00000000


i var byte


main:


hpwm 2 , 255, 1000
 
high PORTA.4 : high PORTC.2 'does't work
high PORTA.5
PAUSE 100
low PORTA.4  : low PORTC.2 'does't work
low  PORTA.5
PAUSE 100


goto main
end

Computer for MicroCode Studio

$
0
0
I'm looking for a laptop thats dedicated only for Pic development and programming. The only purpose in its life is to do that and nothing else, hence the word dedicated. Can anyone have an idea of what I might use?
Will a Chromebook work?

FN-M16P wow's

$
0
0
I guess the original post got lost so here is my followup.

Well after some serious investigation I have found the problem with the mysterious delay in using the FN-M16P playback unit. After loading the exact same utterance files into all of the 99 directory's and selecting the individual directory's for playback I noticed the delay is worse as the directory is increased form 01 to 99. It seams as though the FN-M16P module has some problem whether it be serially discerning the directory name or something else in the firmware. For the best performance and minimum delay it is recommended in my opinion to place single numeric utterances in the lower directory numbers from 01 to 20. I am using the FN-M16P to announce numeric values of: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,30,40,50,60,70,80,90,
Hundred,Thousand, and some ancillary utterances. I as of this post have not heard back from Flyron Technology's about the problem with the delay question.
My only email response from the tech. department was to send them all of my code and they would test it out. I don't think so... I hope this message will help others with delay questions in the future. My project is now progressing quite well.

test

Winstar WS0010 OLED Display Used in SPI Mode

$
0
0
This short demo code provides the basis for using Winstar WS0010 based OLED Displays in the SPI (3-wire) connection mode. If other Forum members are interested, I could pursue rolling this into a library file compatible with various size displays. Wiring connections are illustrated in Winstar's WS0010 App Note Page 8. There are also 3 option jumpers that need to be modified in order to convert the display to SPI mode from 4-bit/8-bit parallel mode. These are:

Remove the jumper "L_CS_H" that bridges the "L_CS" connection
Remove the jumper "J68_J80"
Move the jumper "H_PS_L" to the "PS_L" position from its existing "H_PS" position.

Changing these jumper options requires a bit of soldering skill. The PCB is fragile and it's very easy to damage the copper pads and render the display inoperative.

Code:

'****************************************************************
'*  Name    : 2x8_OLED_SPI_Display_Demo                        *
'*  Author  : Roberts                                          *
'*  Notice  : Copyright (c) 2019                                *
'*          : All Rights Abandoned                              *
'*  Date    : 11/24/2019                                        *
'*  Version : 1.0                                              *
'*  Notes  : Demo code that writes to Vishay OLED-008N002A    *
'*          : 2x8 character display via SPI interface          *
'****************************************************************
'
' THIS OLED DEMO PROGRAM USES A PIC16F1619 MICROCONTROLLER IN THE MICROCHIP CURIOSITY BOARD
'
' Vishay (and several other) OLED character OLED displays are based on the Winstar WS0010 Controller
' whose command language closely emulates Hitachi's HD44780.  The WS0010 also accommodates
' an SPI-like 4-wire interface (CS, MOSI, MISO, CLK), that can be efficiently interfaced to small
' pin-count PIC uCs.  In most applications, only a 3-wire chip-select/data/clock interface is needed.
' However, the WS0010 controller requires a 10-bit clock/data sequence rather than the SPI standard 8-bit
' sequence in order to include the display's "RS" and "R/W" command bits.
' This demo code uses PCP's SHIFTOUT command with 16-bit variables truncated to 10-bits to conform with
' the display's interface requirements.
'
' While PBP's LCDOUT command uses $FE to designate a display command input in 4-bit and 8-bit parallel wired
' modes, this code directly sets the RS=0 to write to the command memory and RS=1 to write to the character memory.
'
' The following demo features these program segments:
'      Microcontroller configuration
'      Initialization and Variable Declarations
'      OLED Initialization
'      Looping Display of Demo Program Name ("2x8 OLED SPI TEST")
'
' The PIC16F1619 and other EMR core PICs have the LATx.x pin write function that overcomes read/modify/write
' conflicts that can occur with PORTx.x pin writes.  If this demo code is run on BL or MR core PICs,
' assigning the CS pin function to a different port is necessary, and relocating the Function Set command to
' the end of the OLED initialization sequence might be required to ensure the OLED adopts 2-line mode.
'************************************************************************************************************

'************************** Microcontroller Configuration PIC16F1619 ****************************************
DISABLE DEBUG            ' Disable ICD code for this section

                        ' Microcontroller Configuration from PBP's "PIC***.info" files (see Ref Manual Pg. 100)
                        ' The following configuration is for a PIC16F1619
#CONFIG
    __config _CONFIG1,  _FOSC_INTOSC & _PWRTE_ON & _MCLRE_ON & _CP_OFF & _BOREN_ON & _CLKOUTEN_OFF
    __config _CONFIG2,  _WRT_OFF & _PPS1WAY_OFF & _ZCD_OFF & _PLLEN_OFF & _STVREN_ON & _BORV_LO & _LVP_OFF
    __config _CONFIG3,  _WDTCPS_WDTCPS4 & _WDTE_ON & _WDTCWS_WDTCWS100 & _WDTCCS_LFINTOSC
#ENDCONFIG

OSCCON = %01110000        ' Set internal osc to 8MHz  (IRCF<3:0> = %1101=4 MHz, %1110=8 MHz, %1111=16 MHz)   
DEFINE OSC 8            ' Tell PBP that the device will clock at 16MHz

ENABLE DEBUG            ' Enable ICD for code that follows

'************************** Initialization and Variable Declarations *****************************************
TRISB.4 = 0      ' Set CS to output
TRISB.5 = 0      ' Set uC SCK pin to output
TRISB.6 = 0      ' Set uC SI pin to output

                ' SPI signals use LATx.x assignments to prevent read/modify/write conflicts on a single I/O port
CS  Var LATB.4  ' uC chip select output pin
SCK Var LATB.5  ' uC clock out pin
SI  Var LATB.6  ' uC data out / LCD Data in pin

CHR_x VAR WORD  ' variable name of characters sent to display
i VAR BYTE      ' loop counter variable   
CS = 1          ' Disable SPI device select CS for OLED

'************************** SPI OLED Initialization Sequence *************************************************
                  'Each command is 10 bits with "00" RS & RW prefix (RS=0,RW=0)
                  'Example: $0028 = %0000 0000 0010 1000 -> 10-bit truncated = %0000101000
                 
    CS = 0                                  'Enable LCD on SPI bus
    SHIFTOUT SI, SCK, 5, [$0028\10]        'Function Set - D/L=0, N=2, Default Font
    CS = 1 : PAUSE 1 : CS = 0              'Disable CS / Pause / Enable CS
    SHIFTOUT SI, SCK, 5, [$0008\10]        'Display OFF
    CS = 1 : PAUSE 1 : CS = 0              'Disable CS / Pause / Enable CS
    SHIFTOUT SI, SCK, 5, [$0006\10]        'Entry Mode - Cursor moves right
    CS = 1 : PAUSE 1 : CS = 0              'Disable CS / Pause / Enable CS
    SHIFTOUT SI, SCK, 5, [$0001\10]        'Clear Display
    CS = 1 : PAUSE 30 : CS = 0              'Disable CS / Pause / Enable CS
    SHIFTOUT SI, SCK, 5, [$0002\10]        'Return Home (line 1 / position 1)
    CS = 1 : PAUSE 30 : CS = 0              'Disable CS / Pause / Enable CS
    SHIFTOUT SI, SCK, 5, [$000C\10]        'Display ON
    CS = 1                                  'Disable CS
   
'************************** Demo Program Name Display ********************************************************   
            'This sequence demonstates sending a character string to the OLED display
            'Each display character is 10 bits with "10" RS & RW prefix (RS=1,RW=0)
            'Example: $0200 = %0000 0010 0000 0000
            '        CHR_x = %          0100 0100 (the letter "D")
            'Bitwise OR'd and 10-bit truncated = %1001000100
main:
    CS = 0
    SHIFTOUT SI, SCK, 5, [$0080\10]              'Start at Line 1 / Position 1
    CS = 1
   
      For i = 0 to 7
      LOOKUP i, ["2x8 OLED"],CHR_x              'Get 1 character at a time from the string
      CS = 0
      SHIFTOUT SI, SCK, 5, [($0200 | CHR_x)\10]  'Bitwise OR to create 10-bit data sequence with RS=1
      CS = 1
      Pause 100                                  'Output the characters at 1/10 second intervals
      Next i                                    'Output all 8 characters on line 1
    Pause 500                                    'Pause 1/2 second
   
    CS = 0
    SHIFTOUT SI, SCK, 5, [$00C0\10]              'Start at Line 2 / Position 1
    CS = 1
   
      For i = 0 to 7
      LOOKUP i, ["SPI TEST"],CHR_x              'Get 1 character at a time from the string
      CS = 0
      SHIFTOUT SI, SCK, 5, [($0200 | CHR_x)\10]  'Bitwise OR to create 10-bit data sequence with RS=1
      CS = 1
    Pause 100                                    'Output the characters at 1/10 second intervals
    Next i                                      'Output all 8 characters on line 2
    PAUSE 2000                                  'Pause 2 seconds after both lines are displayed
   
    CS = 0                                      'Enable CS
    SHIFTOUT SI, SCK, 5, [$0001\10]              'Clear Display
    CS = 1 : PAUSE 1000                          'Disable CS / Pause 1 second with blank display
   
Goto main                                        'Repeat forever

Viewing all 4747 articles
Browse latest View live