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

ESP8266 Memory Upgrade

$
0
0
So you bought an ESP8266 and you are stuck with AT_v0.22 because your module has only 512kB? Well, not any more!

If your are like me and want to use your ESP8266 has is and not try to learn LUA then you are best with the latest AT firmware. Here are how to upgrade your ESP8266 module with a 1024kB flash.

First of all TAKE A PICTURE of your board. It can be helpful because there is no silk screen on the board and you'll have to place the new chip in the right direction.
Second, make sure your flashing setup works. Test it with the last AT firmware available to your setup: AT_v0.22. Flash it with the Flash download tool.

Next you need a new flash memory. Go to your favourite onlined store and search for W25Q80BV. I bought this one. You want the narrow one (150-mil). Chances are you'll find only the wide one (208-mil): don't worry we'll make it fit!

To desolder the old flash you have two options: hot air or Chip Quik. I used hot air with this station. If you are using hot air apply some Kapton tape on the board to protect the other parts. You don't want to see them fly all over the place!

Once removed use some solder wick to remove the excess solder from the pads. Tip: solder wick oxidise with time: apply a little flux before using. If you have the wide chip you'll have to bend a little the pins.


Attachment 7929


Begin by applying some solder on one pad then re-flow that solder and slide the chip in place. Inspect the chip with a magnifier to make sure it is centred then solder the other pins.

You are now ready to flash your module with the latest firmware. New firmware supports OTA (over the air) flashing. Next time you can just use AT+CIUPDATE command to update your module. See readme file in folder \bin\at.


HTH
Attached Images
 

A/D Conversion Clock Select bits confussion ..

$
0
0
Hello everyone ..

For a long time I've been struggling with these settings ... When one would like to perform an ADC reading what kind of settings he must add into his code ?

As far as I read the datasheet of 16F1827 , I see the following details about this setting

Code:

ADCS<2:0>:A/D Conversion Clock Select bits
000=FOSC/2
001=FOSC/8
010=FOSC/32
011=FRC(clock supplied from a dedicated RC oscillator)
100=FOSC/4
101=FOSC/16
110=FOSC/64
111=FRC(clock supplied from a dedicated RC oscillator)

So , If I'm running my PIC at 32 MHZ internal oscillator , the setting should be 011 or 010 ?

and the SECOND QUESTION :

What is the maximum ADC conversion time at 32MHZ for the PIC16F1827 ...
When I look at the conversion tables that Microchip has published for this PIC , I can't understand which is the exact time at the selected OSC frequency that takes for a complete ADC conversion time ..

Thanks in advance ...

Compiler/assembler problems preventing a simple change

$
0
0
I have been trying to fix an issue with some PBP code that was originally compiled with PBP 2.60A. When I compile the code with PBP 2.60A, I can burn it onto the chip (an 18F4520), but it doesn't do anything and the LCD screen its connected to just shows white rectangles. I believe I am also using the MPASM version that was originally used with the code.

I went through the code and the hardware schematics and am completely confident that I only need to change the value of *one* number in the code. It's the lower bound of a comparison in an if statement.

I have the original .hex file which, when burned, will actually work - is there an easy way to find the number in the original hex file?

Any other thoughts into how to solve this problem? In a nutshell, it's that I know how to fix a bug in the code, but can't seem to replicate the settings under which the code was originally compiled.

ADC with independant GND and Vref

$
0
0
Hello,

I'm wondering if it is possible to implement an ADC knowing the analog input has no connection to the PIC's VDD & VSS.

Is this possible?

mplabx and dt ints 18

$
0
0
can any of the few that can get mplabx to work with pbp3 get anything to compile with dt ints included,
I get this
Code:

make[2]: Entering directory `C:/Users/rc/Documents/PBP3/flash/flash.X'
gnumkdir -p build/default/production/_ext/818124931
"C:\PBP3\pbpx.exe"  -ampasmx -k# -os -p18f87j11 C:/Users/rc/Documents/PBP3/flash/flash.X/flash.pbp
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3396 : Address label duplicated or different in second pass (Z00197)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3459 : Address label duplicated or different in second pass (Z00198)
PICBASIC PRO(TM) Compiler 3.0.7.4, (c) 1998, 2013 microEngineering Labs, Inc.
All Rights Reserved.
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3512 : Address label duplicated or different in second pass (Z00199)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3543 : Address label duplicated or different in second pass (Z0019A)
C:\PBP3\DEVICES\PIC18F87J11.PBPINC (337) MSG: SFRs REFOCON, ODCON1, ODCON2, ODCON3, PADCFG1, MEMCON, ANCON1,
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3396 : Address label duplicated or different in second pass (Z00197)
C:\PBP3\DEVICES\PIC18F87J11.PBPINC (338) MSG: ANCON0, and CVRCON should be accessed in alternate memory space
C:\PBP3\DEVICES\PIC18F87J11.PBPINC (339) MSG: with names REFOCON_ALT, ODCON1_ALT, ODCON2_ALT, ODCON3_ALT,
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3459 : Address label duplicated or different in second pass (Z00198)
C:\PBP3\DEVICES\PIC18F87J11.PBPINC (340) MSG: PADCFG1_ALT, MEMCON_ALT, ANCON1_ALT, ANCON0_ALT, and CVRCON_ALT.make[2]: Leaving directory `C:/Users/rc/Documents/PBP3/flash/flash.X'
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3512 : Address label duplicated or different in second pass (Z00199)
make[1]: Leaving directory `C:/Users/rc/Documents/PBP3/flash/flash.X'
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3543 : Address label duplicated or different in second pass (Z0019A)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3396 : Address label duplicated or different in second pass (Z00197)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3459 : Address label duplicated or different in second pass (Z00198)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3512 : Address label duplicated or different in second pass (Z00199)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3543 : Address label duplicated or different in second pass (Z0019A)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3396 : Address label duplicated or different in second pass (Z00197)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3459 : Address label duplicated or different in second pass (Z00198)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3512 : Address label duplicated or different in second pass (Z00199)
Error[116]  C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\FLASH.ASM 3543 : Address label duplicated or different in second pass (Z0019A)


I'm lost


a snippet of the asm file
Code:

    INT_Source  USB_PID_INT, UEIE,PIDEE, _NoPriority
  endif

 ENDASM?

; C:\USERS\RC\DOCUMENTS\PBP3\FLASH\FLASH.X\DT_INTS-18.BAS 00415 Z00199 asm 
Z00199
 ASM?
 
  ifdef ETHIF  ;----{ Ethernet Module }----------------------[PIR2, ETHIF]---
      INT_Source  ETH_INT, PIE2,ETHIE, IPR2,ETHIP
 
              ;----{ DMA Interrupt }-------------------------[EIR, DMAIF]---
      INT_Source  ETH_DMA_INT, EIE,DMAIE, _NoPriority

I2C Ping program

$
0
0
This program tests every valid 8bit write address connected to the I2C bus.
- Confirms you have your connections correct
- Confirms your pull-ups are correct
- Tells you what your I2C address is.

I hope this is useful to people
Regards
TimC

Code:

' I2C Scanner to find devices on I2C Bus
' If a I2C device is functional it will return it's address
' Tim 3/29/04

DEFINE LOADER_USER 1  ' Boot-Loader is being used
DEFINE OSC 20          ' Change to your chip

DEFINE HSER_BAUD        9600        ' override the default of 2400

SDA    VAR                portc.4                ' change if needed
SCL    VAR                portc.3                ' change if needed
LED                VAR                portd.1                ' change if needed                               
i2c_out VAR                BYTE        ' dummy data to sent over I2C bus
i2c_ack VAR                BIT        'acknowledgement bit


main:

    CMCON = 7  ' disable the analog comparator  your chip may be different
        pause 500        ' just because we don't know what we are pinging
    HSEROUT [" *** Start I2C Ping ***",13,10] ' announce
looper:
    for i2c_out = 2 to $fe        step 2        ' Remove step to find both reading and writing address.
        gosub I2c_Ping
        if i2c_ack = 0 then
          HSEROUT ["$",hex2 i2c_out, " "] '
          gosub heartbeat        ' just in case there is no serial port
        endif
    next i2c_out
    HSEROUT [13,10," *** Fini I2C Ping ***",13,10] ' say we are done
End
'**********************************************************************************
'                          Subs
'**********************************************************************************
I2C_Ping:          'Start Conversion
    GOSUB I2C_START
    'i2c_out = %10010000 'Send Address, (device= %1001, A0= 0, A1= 0, A2= 0, R/W= 0)
    GOSUB I2C_TX
    GOSUB I2C_STOP
    RETURN

I2C_TX:                          'I2C transmit -> send data to the slave
    i2c_ack = 1                  'ACK bit will change to 0 if device is found
    SHIFTOUT SDA,SCL,1,[i2c_out]  'Shift out “i2c_out” MSBfirst
    SHIFTIN SDA,SCL,0,[i2c_ack\1] 'Receive ACK bit
    RETURN

I2C_START:              'I2C start (start communication on I2C bus)
    HIGH SDA
    HIGH SCL
    LOW SDA
    LOW SCL
    RETURN

I2C_STOP:              'I2C stop (terminate communication on I2C bus)
    LOW SDA
    HIGH SCL
    HIGH SDA
    PAUSE 1
    RETURN


' Subroutine to blink a pin for heartbeat
heartbeat:
        high LED        ' turn on led no tris needed
        pause 100      ' for .1 seconds
        low LED        ' turn off led
        pause 500      ' for .5 seconds
        return

Output should look like this:

Code:

*** Start I2C Ping ***
$78
 *** Fini I2C Ping ***

If you have more than one device you will see more addresses.

Regards
TimC

Issue with long var types

$
0
0
Hi all,
I am starting a new project using pic18F47J53 and thought I would try long vars rather than using div32. Compiler version is PBPX 3.0.8.4, on Win7 64 bit laptop, I have selected "use compiler long words" in options and my test code compiles successfully and the result shows long variable types have been used.
However my variable sent to debug only increments to 64k (65536) and then rolls over. Even initializing a long var with a number above 64k and sending to debug will not work.
I have tried various pic settings including setting the extended instruction set of pic on/off etc. all no good.
Any suggestions would be appreciated.:confused:
Cheers.

Error[128] Help!

$
0
0
Hello everyone, i've made a simple program to drive LDC display and this happens:
Error[128] g:\pickit~1\pic\pbp247\pbppic14.lib 2945: Missing Argument(s)
Any similar experiences? :/

DHT22 interface problem

$
0
0
Hi, I'm trying to get response from DHT22 sensor with PIC12F675, but something is wrong... Here is my code:
Code:

#CONFIG
    __config _HS_OSC & _WDT_OFF & _CP_OFF & _MCLRE_OFF & _BODEN_OFF  & _PWRTE_OFF
#ENDCONFIG


DEFINE OSC 4


CMCON = 7 : OPTION_REG.7 = 0
LED var GPIO.2
DHT var GPIO.0
pause 100


output DHT
high DHT
pause 10
low dht
pause 10
high dht
pauseus 40
input dht


while dht = 1
high led : pause 50
low led : pause 50
wend


while dht = 0
high led : pause 50
low led : pause 50
wend


end

By the way, sorry for my English speech.

Strange Variable Issue ...

$
0
0
Hello everyone ..

I'm having a very very interesting problem with my code ... I'm trying to understand the basics of a Enhanced Asynchronous communication but in the code there is a line that drives me crazy ...

Code:


'****************************************************************
'*  Name    : EUSARTRX.BAS                                      *
'*  Author  : [BURAK GÜNAY]                                    *
'*  Notice  : Copyright (c) 2015 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                              *
'*  Date    : 7/22/2015                                        *
'*  Version : 1.0                                              *
'*  Notes  :                                                  *
'*          :                                                  *
'****************************************************************
#header
  errorlevel -303  ; suppress Program word too large
#ENDHEADER


#config
 __CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_ON & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
 __CONFIG _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_OFF & _BORV_19 & _LVP_OFF
#ENDCONFIG


'define OSC 4
DEFINE OSC 16
'define OSC 32


'------------- LCD DEFINES ------------------------
DEFINE LCD_DREG PORTB 'LCD data port
DEFINE LCD_DBIT 4 'LCD data starting bit 0 or 4


DEFINE LCD_RSREG PORTA 'LCD register select port
DEFINE LCD_RSBIT 7 'LCD register select bit


DEFINE LCD_RWREG PORTA  ' LCD read/write port
DEFINE LCD_RWBIT 5  ' LCD read/write pin bit 


DEFINE LCD_EREG PORTA 'LCD enable port
DEFINE LCD_EBIT 6 'LCD enable bit


DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 2 'Number lines on LCD
'------------- LCD DEFINES ------------------------


'===============================================================================
'OSCCON=%01101010    'OSC is @ 4 MHZ
OSCCON=%11111000
'OSCCON=%11110000    'OSC is @ 32 MHZ (PLLEN MUST BE ENABLED)


PORTA=%00000000    :      PORTB=%00000000
TRISA=%00000000    :      TRISB=%00000010
 
ANSELA=%00000      :      ANSELB=%00000000
'ADCON0=%00000001    :      ADCON1=%11100000
OPTION_REG.7=0      :      WPUB=%11111111


RCSTA = $90        ' Enable serial port & continuous receive
TXSTA = $24        ' Enable transmit, BRGH = 1
SPBRG = 160        ' 9600 Baud @ 16MHz, -0.08%
SPBRGH = 1
BAUDCON.3 = 1      ' Enable 16 bit baudrate generator


T1CON=%00100000    ' 1:4 prescaler 
'===============================================================================
X      VAR WORD
DAT    VAR WORD
GP      VAR byte        ' GP variable
BytesIn VAR byte[2]    ' Up to 2 bytes
ByteCnt VAR byte        ' Indicates number of bytes in buffer
'EOM    CON "~"        ' EOM = "End Of Message" marker
OERR    VAR RCSTA.1    ' Alias USART over-run bit
CREN    VAR RCSTA.4    ' Alias USART continuous receive enable bit
RCIF    VAR PIR1.5      ' Alias USART received character interrupt flag bit
ByteCnt = 0            ' Zero counter
TMR1ON  VAR T1CON.0  :  TMR1ON=0  :  TMR1=0


LED    VAR PORTA.1
'===============================================================================


LCDOUT $FE,1
PAUSE 500
LCDOUT $FE,$80,"    READY    "
PAUSE 1000
LCDOUT $FE,1


MAIN:


IF OERR=1 THEN
    CREN = 0                        ' Over-run so disable receive
    CREN = 1                        ' Re-enable & clear OERR "over-run" flag
ENDIF


IF RCIF=1 THEN                      ' If RCIF=1 there's a new character in RCREG
    TMR1ON=1                               
    BytesIn[ByteCnt]=RCREG          ' Yes. Store new char in array
'    IF BytesIn[ByteCnt]=EOM THEN Out ' End of message?
    ByteCnt=ByteCnt+1                ' No. Increment array index pointer
    TMR1ON=0
    IF ByteCnt >=2 THEN Out          ' Test for software buffer over-run
ENDIF


IF OERR=1 THEN
    CREN = 0                        ' Over-run so disable receive
    CREN = 1                        ' Re-enable & clear OERR "over-run" flag
ENDIF


GOTO MAIN


Out:
TMR1ON=1'---
DAT.LOWBYTE=BYTESIN[0] 
DAT.HIGHBYTE=BYTESIN[1]
x=dat
FOR GP=0 to ByteCnt                ' Clear array bytes 0 to ByteCnt
    BytesIn[GP]=0       
NEXT               
ByteCnt=0                          ' Reset index pointer back to first element


WHILE RCIF=1                        ' Trash anything received after the EOM marker
    GP=RCREG                        ' by reading RCREG until RCIF is cleared.
WEND
tmr1on=0'---


LCDOUT $FE,$80,"Num  : ",DEC5 x
LCDOUT $FE,$C0,"Delay: ",DEC5 TMR1," uS"


TMR1=0


GOTO MAIN

If I try to view the variable "DAT" directly it always shows zero ... But If I first add a line "x=dat" just as in the code and try to display the "x" it displays the number ?

A way more strange thing is ;

if I change the codelines and try to view both x and dat only x is displayed dat remains zero .. (THE CODE CHANGE IS BELOW)

Code:

LCDOUT $FE,$80,"Num  : ",DEC5 x
LCDOUT $FE,$C0,"Num  : ",DEC5 DAT

How can it happen ? There is something I skip or ignore to see ?

Thanks in advance ..

Simple question about While Wend...

$
0
0
I have been trying for a while to get this simple code to work. Can someone tell me why it won't?

Thanks, Don

while porta.2 <> 0
wend
high portb.6

porta.2 has pullup installed but led on portb.6 always lights....... isn't it supposed to sit there until porta.2 becomes low?

Temperature Indicator Usage

$
0
0
Hello ;

I'm trying to use the built in temperature sense function of PIC16F1827 but so far I haven't had any luck with that .. All I have tried to do is reading the RAW ADC value of the silicon die operating temperature value but I don't get anything meaningful ...

I have a potentiometer connected to RB1 (analog channel 11) and the other adc reading is performed on analog channel 29 which is supposed to give me the result of the raw temperature reading of the silicon die .. When I rotate the potentiometer I see what I must see which is the actual expected raw adc reading result coming from the ADC channel 11 but the temperature reading I'm trying to get changes too while I rotate the pot and works dependent to the ADC value that I get from my potentiometer ...

I was so exciting with the idea of reading the chip temperature without any external component but It's been a total frustration ...

Code:

'****************************************************************
'*  Name    : PIC16F1827.BAS                                    *
'*  Author  : BURAK GÜNAY                                      *
'*  Notice  : Copyright (c) 2014 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                              *
'*  Date    : 27.4.2014                                        *
'*  Version : 1.0                                              *
'*  Notes  : PIC16F1827                                        *
'*          :                                                  *
'****************************************************************

#header
  errorlevel -303  ; suppress Program word too large
#ENDHEADER


#config
 __CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
 __CONFIG _CONFIG2, _WRT_OFF & _PLLEN_ON & _STVREN_OFF & _BORV_19 & _LVP_OFF
#ENDCONFIG
'-------------------------------------------------------------------------------
'define OSC 4
'DEFINE OSC 16
define OSC 32


'OSCCON=%01101010    'OSC is @ 4 MHZ
'OSCCON=%01111000    'OSC is @ 16 MHZ
OSCCON=%11110000    'OSC is @ 32 MHZ  --- PLLEN MUST BE ENABLED


'------------- LCD DEFINES ------------------------
DEFINE LCD_DREG PORTB 'LCD data port
DEFINE LCD_DBIT 4 'LCD data starting bit 0 or 4


DEFINE LCD_RSREG PORTA 'LCD register select port
DEFINE LCD_RSBIT 7 'LCD register select bit


DEFINE LCD_RWREG PORTA  ' LCD read/write port
DEFINE LCD_RWBIT 5  ' LCD read/write pin bit 


DEFINE LCD_EREG PORTA 'LCD enable port
DEFINE LCD_EBIT 6 'LCD enable bit


DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 4 'Number lines on LCD


DEFINE ADC_BITS 10    ' ADCIN resolution  (Bits)
DEFINE ADC_CLOCK 6    ' ADC clock source  (Fosc/64)
DEFINE ADC_SAMPLEUS 20 ' ADC sampling time (uSec)


'------------- LCD DEFINES -------------------------


'-------------------------------------------------------------------------------
PORTA=%00000000    :      PORTB=%00000000
TRISA=%00000000    :      TRISB=%00000010
ANSELA=%00000      :      ANSELB=%00000010
ADCON0=%00000001    :      ADCON1=%11100000
FVRCON=%00110000
'-------------------------------------------------------------------------------                   


value      var word    :  value=0
rawtemp    var word    :  rawtemp=0
       
lcdout $fe,1
pause 500
 
MAIN:


adcin 11,VALUE
adcin 29,rawtemp


LCDOUT $FE,$80,"      ",DEC5 rawtemp,"    "
LCDOUT $FE,$C0,"      ",DEC5 VALUE,"    "


GOTO MAIN

Where do I make mistake ?

I'm expecting your helps , there must be at least a couple others that might have been interested in this function of such MCUs ... Thanks in advance

Help with GOSUB

$
0
0
Hi. First time post here. I'm using PIC Basic Pro, MPLAB ASSEM and a PIC16F870.
Need some help with the GOSUB in my code.

I'm telling a Compact Flash card that I want to read 256 sectors and then pulse
RD low 65535 times to get the 16Bit data out. I do this 4 times because the whole
file is 4 x 256 sectors.

If I put the little REPEAT...UNTIL code after each call up of 256 sectors, the program
works fine. I can push the start button as many time as I need for the whole file
to be read from the compact flash card.

If I use a GOSUB dat to go to the little dat: REPEAT...UNTIL RETURN pulse RD low routine,
the program
will only work about 4-5 times and then vapour locks. The RD pin keeps running
(pulsing low) and doesn't stop after 65535 pluses. The code doesn't recover.

Any ideas?

Thanks
Attached Files

Do I need an oscillator?

$
0
0
Hello All,

I haven't finalized the design, but I'm thinking I will be using the 16F819. I have a module that I'm making that will do certain functions when certain inputs are activated, but I wanted to ask about one feature I was going to be implementing and needed to know if the oscillator was necessary.

The one feature this module will have is that when a certain input is activated, the module will begin a timed output. After this time expires, the output will turn off. However, the twist is this; because I want to monitor the other inputs in 1/10th second increments, do I even need an external oscillator? The pic usually handles short counts quite accurately. I would just use a counter to keep track of the number until say 5 minutes is reached. It doesn't have to be accurate, the timed output is simply to prevent excessive draw on the battery.

So, using a pause 100 command along with a counter seems pretty straight forward to me, but I just wanted to run it past you guys to see if I was missing something. If another input is activated, the timer would simply exit and reset it's count.

My logic seems sound unless someone objects.

Thanks,
Tony

Continuous Read Op. From EEPROM

$
0
0
Hello ;

A question digging my mind for a long time ..
I'm aware of that a continous EEPROM write ops to a PIC uC is not recommended since it's got a limitation stated in the datasheets varying between 1M and 10M times ...

How about the continous readings from EEPROM ? Does it have limitations too ? As far as I searched for the datasheet I could not find anything about it ?

Ideas ?

Thanks :)

Nokia 3310 Custom size characters

$
0
0
Hi, my English speech is not very well, so I hope that you understand me.
I want to ask, how to do custom size characters and how to make custom design like this:
Attachment 7951
Attached Images
 

Prototyping PCB Service From SysPCB

$
0
0
Shenzhen SysPCB was found in 2006, we are pcb manufacturer in Shenzhen China, Our total investment is 2.5 million USD, plant area 17000sqM with more than 800 employees.

We focus on the manufacturing of quick turn, prototype, small to middle volume PCBs, we have full equipments and lines of PCB manufacturing, to see our facilities, please visit www.syspcb.com. The whole pcb process is finished in our plant. We focus on rigid circuit board up to 26 layers, also we provide metal core PCB and FPCB as well.
We mainly work for R&D department and high-tech enterprise all over the world.

Our key spirit is: “To be the reliable PCB manufacturer”. Try us. You inquiry will get prompt reply.
Attachment 7956
Attached Images
 

Bought this RF modules

$
0
0
hello
http://www.dx.com/pt/p/rf1100-232-cc...Q#.VbtNY_NViko

Bought this RF modules is working there are times that he forgets the configurations have to connect the PC to reconfigure all
how could I send the configuration to it when I connect the PIC
The modules are configured in hexdecimal
Elguem have an idea how I do it or somebody already had this problem.
RF1100-232 command table

Set serial port baud rate

Text Command Code Baud Rate Description
Length 2 bytes 1 byte 0x01: 4800
Format hex hex 0x02: 9600
Fixed 0xA3, 0x3A 0x01/0x02/0x03 0x03: 19200





Example: sending 0xA3, 0x3A, 0x03 to the module sets the serial port baud rate to 19200.

Set channel communication rate (not supported/implemented according to the documents I found)

Text Command Code Channel Rate
Description
Length 2 bytes 1 byte
Format hex hex
Fixed 0xA5, 0x5A 0x64






Set channel

Text Command Code Channel Number
Description
Length 2 bytes 1 byte Channel number from
Format hex hex 0x00 - 0xFF
Fixed 0xA7, 0x7A 0x00-0xFF (256 channels)





Example: sending 0xA7, 0x7A, 0x10 to the module sets the channel to 16 (0x10 hex).

Set module ID

Text Command Code Module ID
Description
Length 2 bytes 2 bytes 2 bytes module ID
Format hex hex 0x0000 to 0xFFFF
Fixed 0xA9, 0x9A 0xFF, 0xFF






Example: sending 0xA9, 0x9A, 0x00, 0xFF to the module sets the module ID to 255 (0x00FF hex).

Set TX power

Text Command Code TX Power
Description
Length 2 bytes 1 byte transmit power (dbm)
Format hex hex 0x00, 0x05, 0x07
Fixed 0xAB, 0xBA 0x00/0x05/0x07/0x0A
or 0x0A (10 decimal)





Example: sending 0xAB, 0xBA, 0x0A to the module sets the TX power to 10dbm.

Read config from module

Text Command Code Returned Data Format
Length 2 bytes 1 byte 1 byte
1 byte 1 byte 1 byte 2 bytes
Format hex hex hex
hex hex hex hex
Fixed 0xA6, 0x6A 0xA6
Channel
Channel Rate Baud rate Power Module ID




Example: sending 0xA6, 0x6A to the module returns the following data containing the module's current config:

0xA6, 0x10, 0x64, 0x03, 0x0A, 0x00, 0xFF

0xA6 - start of config dump (fixed)
0x10 - Channel number 16 (0x10 hex)
0x64 - Channel rate (fixed)
0x03 - 19200 baud
0x0A - 10 dbm TX Power
0x00, 0xFF - 2 byte module ID

Usercommand macro generator

$
0
0
I was playing first time with USERCOMMAND today.
And there are great extension, but they require a lot of typing if you want to support all variable types.
For usercommand with 1 input variable you need minimum 4 macros(each for bit, byte, word, and constant), if you have 2 inputs in your command, then you need 16.
If you are using long, then 25 macros just for 2 inputs, 3 input 125 macros. And that is too much...
So I created little App in VS2012 to do hard work...
I just finished it and just give it quick test. Should be fine, but use at own risk!
Screenshot:
Attachment 7960
Here is project:
Attachment 7961
If you want to use just .exe path is "...Archive\UserCommand\bin\Release\UserCommand.ex e"
Requires at least .NET Framework 2.0.
Attached Images
 
Attached Files

High quality TFT/OLED color graphics (including movies) for 8-bit PICs/PBP

Viewing all 4745 articles
Browse latest View live