Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
monnoliv said:Hi,
I've developped a module with the DS89C450 on USB port. Programming is done @ max speed of 170kb/s via USB with the integrated bootloader.
Here is my website, choose your langage in the left and the project in the left too:
h**p://www.soudez.be
I've developped some codes also for In Application Programming. I'll put them soon in the project forum.
glenjoy said:What is the need to interface it via USB? It already has a bootloader for serial port?
silvio said:glenjoy said:What is the need to interface it via USB? It already has a bootloader for serial port?
Maybe for the days when serial port will became legacy or obsolete, call it how you like. But when that time will come I'm expected to see a USB interface for programming.
Until then let's play with USB -> Serial convertor.
Ha, Ha, Ha however you can't program faster than DS89C450 can hold the transmission rate.
Oh almost I forgot, maybe you would like to program more DS89C450 in the same time, all of them hanging on the USB bus.
Just a joke folks !
1. No need for a switch to enable the bootloader mode.Yeah, just can't see the logic behind making a USB interface for a microcontroller which supports programming via Hyperterminal because of tis built-in bootloader.
no need for a switch to enable the bootloader !
2. Fast (no every COM PORT can sustain 170kbaud/s)
3. Self-powered.
4.Embedded software upgradable on the fly (fix like).
monnoliv said:1. No need for a switch to enable the bootloader mode.Yeah, just can't see the logic behind making a USB interface for a microcontroller which supports programming via Hyperterminal because of tis built-in bootloader.
2. Fast (no every COM PORT can sustain 170kbaud/s)
3. Self-powered.
4. Embedded software upgradable on the fly (fix like).
What are you talking about ??? Did you see the schematics ?Do you understand the purpose of that switch ? Hope you're talking about AC125 gates.
If you don't, thought I'm confident you did, let me explain.
It's there to allow using an external flash driven by PSEN since it's an output pin and during programming act as input.
Obvious, you don't want to get in conflict after programming.
Why would use an external flash since the micro provides 64k internal ?
I don't know, but maybe you use an 89C420 or 89C430. Probably the manufacturer thinks, too.
Of course I'm talking about physical switches (and with serial port you can have some problem using a laptop).You said
no need for a switch to enable the bootloader !
HA HA HA ! But your outputs DTR# RTS# of U2 and Q2 what are they doing ?
And why wouldn't use directly the ones provided by PC COM serial port ?
What are you talking about ? I'm using the FT232BM in custom baudrate, I'm not using COM port.But that's only mathematical because in real life in order to mantain a reliable communication channel you must attempt to match the loader baud rate and PC COM port baud rate within 3%.
Of course that makes sense. If you don't understand, continue with your 19.2kb.And what's that speed for programming. We are not at race. Few seconds more or less it doesn't matter at all.
Nevertheless, if your FTDI chip it's like a border, on the left side you'll get the high USB speed, whereas on the right side you get only the microcontroller serial port speed.
Does make sens ?
You've already made the calculation. As you're not confident with the module, I don't have to give you the custom divisor.Can you tell us what's the real serial baud rate for programming ? ("on the right side border of FTDI chip")
That's not really funny. You're talking about ISP and pluging a cable from the PC. Then from what connector ????Well, that's funny !
The main purpose of ISP it's what the name said. In System Programming.
It's supposed that the microcontroller is already fitted in a board with his own power supply.
And the only thing that you want is to change the flash contents.
After that just gently remove your communication cable and run your program.
Why hanging on USB bus like a leech sucking power when running your program ?
Just for test ? But you can test & upgrade in your board !
It's a pity to read such things: Do you know what UPGRADING means ??? (and NOT with a ISP cable for the end user)Well, do you know what I'm calling really on the fly ?
The IAP features. YES, InApplicationProgramming.
It's a ordinary term in microcontroller area.
And that's really embedded.
The truth, that's it. If you're offended...You know what reminds me your 4 sentences ?
And then ? What's the matter with the chip ?Do you know what was the 89C4XX speed mentioned before first 89C4XX was released ?
If you don't, please allow me : 50Mhz.
Why did they retrain to 33Mhz ? Because the harware didn't helped.
Remember, it's one clock / machine cycle (fetch + execution).
During that 1 clock, every internal action (which takes 12 clocks in genuine 8051 series) is split in small amounts. If something it's not in synch, you're lost.
Nevertheless that not all instruction are executes in one clock cycle.
??? The module can be self powered and/or externally powered.Cannot see the logic also why put a self powered micro on my system, does not want to burn my PC's USB because it cannot anymore handle its rated load.
No, the micro is the one I selected among others thanks to the bootloader, IAP, 64KFLASH, 33MHz speed.As silvio said, job well done man but on the wrong micro.
Because the module (+cable) is the only hardware you need to do 8051 development. It's easy and fast as I wrote. Buy a PDIP40 DS89C4XX and you've nothing (but the uP) in the same package.There is PDIP available for DS89 series, what is the use of using a smaller package, a higher cost and a PCB resized to a PDIP just like a basic stamp.
It's a choice. If you need XRAM choose another topology.By connecting hardware the ALE toward +5v you've killed the XRAM access.
I know you mentioned that your board will provide only 1kb XRAM.
But would be a serious limitation for peoples eager for much RAM ?
What are you talking about ??? Did you see the schematics ?
If you don't understand, continue with your 19.2kb.
As you're not confident with the module, I don't have to give you the custom divisor.
That's not really funny. You're talking about ISP and pluging a cable from the PC. Then from what connector ????
Using USB is fast, easy and does not require any external power supply to reprogram the FLASH
It's a pity to read such things: Do you know what UPGRADING means ??? (and NOT with a ISP cable for the end user)
No, the micro is the one I selected among others thanks to the bootloader, IAP, 64KFLASH, 33MHz speed.
Because the module (+cable) is the only hardware you need to do 8051 development. It's easy and fast as I wrote. Buy a PDIP40 DS89C4XX and you've nothing (but the uP) in the same package.
It's a choice. If you need XRAM choose another topology.
monnoliv said:What are you talking about ??? Did you see the schematics ?Do you understand the purpose of that switch ? Hope you're talking about AC125 gates.
If you don't, thought I'm confident you did, let me explain.
It's there to allow using an external flash driven by PSEN since it's an output pin and during programming act as input.
Obvious, you don't want to get in conflict after programming.
Why would use an external flash since the micro provides 64k internal ?
I don't know, but maybe you use an 89C420 or 89C430. Probably the manufacturer thinks, too.
Of course I'm talking about physical switches (and with serial port you can have some problem using a laptop).You said
no need for a switch to enable the bootloader !
HA HA HA ! But your outputs DTR# RTS# of U2 and Q2 what are they doing ?
And why wouldn't use directly the ones provided by PC COM serial port ?
What are you talking about ? I'm using the FT232BM in custom baudrate, I'm not using COM port.But that's only mathematical because in real life in order to mantain a reliable communication channel you must attempt to match the loader baud rate and PC COM port baud rate within 3%.
Of course that makes sense. If you don't understand, continue with your 19.2kb.And what's that speed for programming. We are not at race. Few seconds more or less it doesn't matter at all.
Nevertheless, if your FTDI chip it's like a border, on the left side you'll get the high USB speed, whereas on the right side you get only the microcontroller serial port speed.
Does make sens ?
You've already made the calculation. As you're not confident with the module, I don't have to give you the custom divisor.Can you tell us what's the real serial baud rate for programming ? ("on the right side border of FTDI chip")
That's not really funny. You're talking about ISP and pluging a cable from the PC. Then from what connector ????Well, that's funny !
The main purpose of ISP it's what the name said. In System Programming.
It's supposed that the microcontroller is already fitted in a board with his own power supply.
And the only thing that you want is to change the flash contents.
After that just gently remove your communication cable and run your program.
Why hanging on USB bus like a leech sucking power when running your program ?
Just for test ? But you can test & upgrade in your board !
Using USB is fast, easy and does not require any external power supply to reprogram the FLASH.
It's a pity to read such things: Do you know what UPGRADING means ??? (and NOT with a ISP cable for the end user)Well, do you know what I'm calling really on the fly ?
The IAP features. YES, InApplicationProgramming.
It's a ordinary term in microcontroller area.
And that's really embedded.
The truth, that's it. If you're offended...You know what reminds me your 4 sentences ?
And then ? What's the matter with the chip ?Do you know what was the 89C4XX speed mentioned before first 89C4XX was released ?
If you don't, please allow me : 50Mhz.
Why did they retrain to 33Mhz ? Because the harware didn't helped.
Remember, it's one clock / machine cycle (fetch + execution).
During that 1 clock, every internal action (which takes 12 clocks in genuine 8051 series) is split in small amounts. If something it's not in synch, you're lost.
Nevertheless that not all instruction are executes in one clock cycle.
??? The module can be self powered and/or externally powered.Cannot see the logic also why put a self powered micro on my system, does not want to burn my PC's USB because it cannot anymore handle its rated load.
No, the micro is the one I selected among others thanks to the bootloader, IAP, 64KFLASH, 33MHz speed.As silvio said, job well done man but on the wrong micro.
Because the module (+cable) is the only hardware you need to do 8051 development. It's easy and fast as I wrote. Buy a PDIP40 DS89C4XX and you've nothing (but the uP) in the same package.There is PDIP available for DS89 series, what is the use of using a smaller package, a higher cost and a PCB resized to a PDIP just like a basic stamp.
Added after 8 minutes:
It's a choice. If you need XRAM choose another topology.By connecting hardware the ALE toward +5v you've killed the XRAM access.
I know you mentioned that your board will provide only 1kb XRAM.
But would be a serious limitation for peoples eager for much RAM ?
Because the module (+cable) is the only hardware you need to do 8051 development. It's easy and fast as I wrote. Buy a PDIP40 DS89C4XX and you've nothing (but the uP) in the same package.
I believe what I see, if I tell you that I'm programming @ 85kbaud (minimum, see further) without error, that's true.When a lot of peoples complains about slower baud rates during programming and even when manufacturer admit that a reliable programming must be done at lower baud rates, you come and say that's fake !
What is the speed you reach without error ? (be honnest, because I saw some posts here that are not famous).Who said that I can't program at higher baud rate ?
If you didn't succeed to cross the border of 19.2kb, that's your problem !
With a special tools that's called oscilloscope :wink:BTW do you have a special monitor program in order to see what's scheduling latency in USB bus ?
Otherwise, how can be so sure that DS89C450 is driven with the desired baud rate during programming ?
64 [kbyte] @ 19200 [bauds] means 65536*8 [bits] @ 19200 [bits/s] divided by 8/10 for the encapsulation (start bit and parity) then 34Or you just start with 170k baud rate sending <CR> character (0Dh) and then retrain down to a baud rate that can be detected by the autobaud routine ?
Have you count how long it takes to program 64k at 19200 ? How about 170k ? (which I have serious doubts has been achieved, nevertheless that don't match 3% mentioned)
I don't want to proove anythingI understand you want to proove your skills but not with these arguments !
Don't buy a "ordinary" USB-RS232" converter because some of these are really shit, but buy a good one.If I'll ever have problems with laptops lacking the serial port then I would buy an ordinary USB -> RS232 convertor found in any PC magazine. Only if I feel the need. The loader program in PC able to comunicate with DS89C450 through USB convertor ? That wouldn't be a problem.
I know what ISP means, I know that you have to use a SPECIAL ISP CABLE (with some electronics). Not me.Please allow me to spell what ISP means : In System Programming.
His purpose ? To avoid removing the microcontroller from the board, and programming into a so called parallel programmer and then fitting back into board.
Thus all you want to do is fitting a three wires cable coming from serial port and using the existent power supply from your board.
Why do you need additional one like specific parallel programmer since the microcontroller has already one ?
Just because FT232BM provides PWREN# pin and must be used if it's there ?
The ISP was not created for the microcontroller sitting in a newbie's breadboard without power supply.
If your board was created for such kind of experiments, then it's yout choise !
But don't defeat the ISP purpose !
I don't understand, sorry english is not my mother tongue.I thought you have come with a solution to the indeterminated scratchpad memory(00h - 7Fh) used by the ROM loader,
and you are coming with the idea that I don't know what UPGRADING means ?
A ISP cable for end user ? That's a joke boy ! Four wires from PC COM port to your target board ?
How about ones with JTAG interface ?
I know this, but I'm not using IAP to UPGRADE the embedded software. I use instead the integrated bootloader. Why do you want to rewrite a bootloader ???DS89C450 support IAP for only the upper bank of the on-chip programming memory (32k) since the lower bank (32k) contains system hardware-dependent codes that are crucial to system operation and should not be altered during in-application programming that's not a really IAP, even if you can change individual bytes in the upper block. If you call this UPGRADE, maybe could be because you want to upgrade only small amounts of code and not all 64k program. But I can call it full IAP upgrade.
However, it's the truth.You've nothing !
I believe that a lot of people using this chip will feel offended !
If I wanted to use external SRAM, I'm not sure I'll use the DS89CX processor.Did you ever tried fitting a fast SRAM with <10ns tACC in order to get advantage of full 64k XRAM and run the DS89C450 in PAGE MODE 1 EXTERNAL TIMING—PAGES 1:0 = 00b and MD2:MD0 = 000?
When the stretch value is cleared to 000b, there is no stretch on external data memory access, and a MOVX instruction is completed in two basic memory cycles
And you give it up because didn't succeed ?
That's a chalenge. Wouldn't want to give it a try ? But released ALE from hardware +5v.
The great improvement (for me...then) is to have a fast (4May I ask you if what are the great improvements of your design, does your design makes the DS89C420 act like the basic stamp, or you were just challenged by the PSOC Invention board and wanted to create something like it, I appreciate what youve done, better yet, you applied it for a USB pic programmer of all of us here will be happy Smile and of course will be so much thankful to you.
Ok, you don't have switches. I never try this way but I'm confident with your schematic. Then ? Do you know the consumption of the module ? Less then 100mA (indirect measurement). And what A GREAT THING to develop with a module without these fucking power cables (and transformer). Just plug the module, that all.As I've said, check my design if you can see any physical switches, and sorry to tell you, it has none, why use a micro in a laptop? do you always carry a micro on a travel to program? Or you just bring a laptop and a simulator? Hey, I do not use laptop to program my micro most of the time because it will just drain my batteries.
For me, for sure the quickest the upload is, the better is. It's my opinion.No one needs to program a micro that fast, and as I see it, the target users of your design are beginners too.
That's not a problem for me. I can tell you the real bad thinks of this design:They do not need that speed, and what is the real time increase in speed compared with the actual speed, you know sometimes we create a very good design as we see it, then when others sees it, they will say good and bad comments, good comments are quite useless because you too gives good comments on your design, the important are the bad comments because they are the one's that will improve our next outcome, don't be pissed off, we are criticizing because we want you to improve what you've done or apply to other ery good application, you know, it does not mean that you are a good engineer or scientist means you are also good in conceptualizing things or imagining new good applications.
I'll give you the detailed price of the module and a comparison with the "classical" way to do.Good point but again bad idea, how much is your module and how much is a MAX232, DS89C420, LM7805, Tri-state switch and of course a multipurpose breadboard? You think it is feasible to submit a project containing your board rather a PDIP DS89C420?
What are you calling improvement ? BASIC isn't improvement, it's a shit. Beginners have better to learn assembler or C language.You know, you did not create any improvement on the functionality of the micro by creating that board.
Ok, you don't have switches. I never try this way but I'm confident with your schematic. Then ? Do you know the consumption of the module ? Less then 100mA (indirect measurement). And what A GREAT THING to develop with a module without these fucking power cables (and transformer). Just plug the module, that all.
monnoliv said:Here is the comparison, it's a rough one (from RS components, I know they are not cheap). The module is not as expensive regarding the RS232 solution.
Concerning the price of the 4 layer PCB, I've ordered @ PCB-POOL the minimum surface, because of this, I had to order ten PCB and, with shipping, that gives about 19 € per PCB.
Concerning the price on my website, I ask 10€ for assembling, then the complete assembled module is 57 €. Again, I'm not a commercial guy. I give all the soft, schematics for the one who want to build the module.
monnoliv said:Here is the comparison, it's a rough one (from RS components, I know they are not cheap). The module is not as expensive regarding the RS232 solution.
Concerning the price of the 4 layer PCB, I've ordered @ PCB-POOL the minimum surface, because of this, I had to order ten PCB and, with shipping, that gives about 19 € per PCB.
Concerning the price on my website, I ask 10€ for assembling, then the complete assembled module is 57 €. Again, I'm not a commercial guy. I give all the soft, schematics for the one who want to build the module.
Yes but ...I hope that both of you agree using the crystal multiplier feature of DS89C450.
This way we can achieve EMI reduction, too.
That's the problem and the reason why I choose near 33MHz clock generator.But this approach (using crystal multiplier) leads to lower speed flash programming.
YesObvious if the length byte inside record type 00 is less than 16 then the command "L" must be issued more than 4096 times.
This could happens if the assembler or C compiler don't build the hex file in constant 16 bytes chunck / record.
Don't bother, just check in the meantime then the ack is good.Now comes the advice: New records SHOULD not be transmitted until the ACK/NACK byte associated with the previous record has been received.
The best ACK for us is "G" that means record was received and programmed without error.
How fast the "B" comes after those 20 bytes has been sent ?
Do you have the source code of the bootloader ? I don't have it. Doing some estimation is good but I've done some experimentation:Someone could claim that depends of the time required for flash cell programming. How much is takes ?
If we look into data sheet page 11, tPROG = max. 40 uS.
If we look into IAP section at page 23 the FBUSY bit may not change state for up to 1 uS.
Since I'm expected that ROM Loader uses the same registers FCNTL5h FDATA6h like IAP does, I believe that 1 uS is that prog time.
Now, how much time it takes to program 16 bytes ? Yes, you guess 16 uS, regardless the overhead time required by routine programming which ends waiting for FBUSY to return to 1.
Included in this routine are preprogramming assessment and postprogramming verification, too.
How much time it takes to send serially the payload 16 bytes at 115k baud rate ?
20 bytes x 11 bits (Start bit + 8 + Parity + Stop bit) x 1/115200 = 2 mS which is by far greater than time required to program them in flash.
Thus we can't say here it's the bottle neck which limits the speed programming.