As far as i'm aware of, Stamp and PBP is not as this different... can you post the Stamp code?
As far as i'm aware of, Stamp and PBP is not as this different... can you post the Stamp code?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Mr. E, I feel like the guy at the piano. Here's the BS2 code
FM CON 14
HIGH FM
Start_Up:
SEROUT FM,396,[$55,$00] '00 is the stop command
PAUSE 5000
SEROUT FM,396,[$55,$03,$40] 'first speed command
PAUSE 5000
SEROUT FM,396,[$55,$03,$80] 'second speed command
This repeats through several speed steps and loops back with GOTO Start_Up: The $55 is the sync, $03 is the set DC speed and the last part of the string is the 00 to FF speed levels. Details of this are from the Solutions Cubed group.
I tried using SEROUT and SEROUT2 with different mode numbers, string precedes, INCLUDES, DEFINES. Since the pinouts are different between the BS2 and 16F628 I could have had the pin path wrong. I tried to work this out with no change. Thanks for any help with this. JS
mm are you saying that even if you change our code to...
It doesn't work???Code:FM VAR PORTB.4 HIGH FM Start_Up: SEROUT2 FM,396,[$55,$00] '00 is the stop command PAUSE 5000 SEROUT2 FM,396,[$55,$03,$40] 'first speed command PAUSE 5000 SEROUT2 FM,396,[$55,$03,$80] 'second speed command
you must use SEROUT2 to be BS2 compatible with the baudrate definition. 396 should be 2400,8,N,1. If you want to use SEROUT you'll write it like..
HTHCode:FM VAR PORTB.4 HIGH FM Start_Up: SEROUT FM,0,[$55,$00] '00 is the stop command PAUSE 5000 SEROUT FM,0,[$55,$03,$40] 'first speed command PAUSE 5000 SEROUT FM,0,[$55,$03,$80] 'second speed command
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I tried both versions with the same result. I added DEFINE CHAR_PACING with different values, no go. I wrote a blink routine for PORTB outputs and they all checked good. The MCS is a little tricky to work with so I have been double checking the parameters before programming. I am using the internal osc. and have DEFINED it so in some programs, again no change. My scope is down with a bad cap and the part won't be in for awhile so there isn't a good way to look at the output. Digital voltmeter and connection checks show nothing unusual. Not a very good day at the keyboard. I seem to have hit the brick wall. Later JS
If you use MPASM as assembler try...
if you use PM as assembler, look and try all the suggestion in the FAQ section. There's a full thread wich discuss of HOW TO.Code:@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _BODEN_ON ' Internal Oscillator ' Enable watch dog timer ' Enable power up timer ' Disable MCLR pin ' Disable low voltage programming ' Enable brown out detect
here it is => http://www.picbasic.co.uk/forum/showthread.php?t=543
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
If the MCS config. options list is correct regarding the device setup, why should it be necessary to add the redundant assembly code? Which has last say, the actual program code or the IDE controlling the up load. Never the less when I try adding the device config lines as they are presented from the site all I get is:
ERROR 16F628~5 ASM 45:[235] opcode expected instead of 'PIC16f628'
If I take the 16f628 out of the line, the error code changes to:
ERROR 16F628~ 5 ASM 45: [235] opcode expected instead of intc_osc_noclkout
The basic questions are:
What am I doing wrong regarding the code? If the program is OK,
Is it a hardware or sofware problem? Other options woulld be to: try another chip or install PBP into the MPLAB. I'm not ready for the latter. I guess my frustration is showing. JS
O.K. Let's try something first. A very simple test program test to send a text string to your PC via COM port. You'll use the MCS serial communicator (F4 then F9 to connect to the PORT)
if you use PM as assembler, use the following config fuses OR set them manually.Code:' ' Hardware configuration ' ====================== @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _BODEN_ON ' Internal Oscillator ' Disable watch dog timer ' Enable power up timer ' Disable MCLR pin ' Disable low voltage programming ' Enable brown out detect TRISB=0 ' PORTB : output to all i/o ' ' Hardware connection ' =================== SerPin var PORTB.4 ' Serial data out connected via 1K resistor ' to PIN 2 of PC DB9 connector ' Don't forget the GND :o) ' ' Serial Communication definition ' =============================== BAUD con 16780 ' 2400 Baud, Driven inverted, No Parity ' ' Software/Hardware initialisation ' ================================ serpin = 0 ' Set Serial data out to normal state pause 100 ' safe settle time ' ' ////////////////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ' ' Program Start Here ' ' ////////////////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ' START: SEROUT2 SERPIN,BAUD,["PC COMMUNICATION TEST",13,10] PAUSE 500 GOTO START
is the above work?Code:' ' Hardware configuration ' ====================== asm DEVICE PIC16F628, INTRC_OSC_NOCLKOUT ; Internal Oscillator DEVICE PIC16F628, WDT_OFF ; Disable watch dog timer DEVICE PIC16F628, PWRT_ON ; Enable power up timer DEVICE PIC16F628, MCLR_OFF ; Disable MCLR pin DEVICE PIC16F628, BOD_ON ; Enable brown out detect DEVICE PIC16F628, LVP_OFF ; Disable low voltage programming ENDASM
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks