dannygrob / OpenWatch

Open source watch based on Smarchwatch, da14683
GNU General Public License v3.0
36 stars 6 forks source link

Programming #2

Open d3mon187 opened 4 years ago

d3mon187 commented 4 years ago

Hey @dannygrob , so I'm kind of stuck at the moment on programming. I purchased the Development Kit USB you linked to, setup the software, and even managed to build the original SmarchWatch project and load it to run on the Development Kit USB itself after switching the jumper to 3v. No idea what running it on the usb gets someone since it doesn't have a screen, but I can guess it's working by seeing that it broadcasts a smarchwatch bluetooth signal.

My question is, how do I connect the Development Kit USB to the pcb, or am I not supposed to? I realize you might not have messed with the dev kit usb, but any help you can give in figuring it out would mean the world to me!

If you look at the schematic the board has some holes for header pins at MIKROBUS & GENERAL PURPOSE CONNECTORS section. There's a RST, GND, and CLK in J6. Not sure what SWDIO on the pcb would connect to? Also, do you just solder temporary headers to the board, connect wires directly, or is there something simpler I'm missing?

There's a user manual for the device here - https://www.dialog-semiconductor.com/sites/default/files/um-b-094_da14683_usb_kit_rev_1.0.pdf if it helps.

Thanks!

dannygrob commented 4 years ago

Hi!

I do use the devkit usb. You should see it as a seperate unit that replaces the custom pcb. It has the same dialog semi micro, and build-in serial port for debugging all over usb. It speeds up development and testing code as you can just plug it in. You can even connect the display if you have a breakout board (i got one with my display) to the i2c connection on the devkit

SWDIO on the pcb is to connect it to a JLink mini programmer that replaces the usb part on the dev kit. That way you can load code. The rx tx are for the com port to debug, but you need a ttl serial converter to usb for that.

I really want to make a step by step guide to get started for this, as once you know how to connect it, it is really doable. But a very steep learning curve to start! I'll try harder to find some time for this.

https://imgur.com/a/XhRLSg0

d3mon187 commented 4 years ago

Thanks for answering all my questions! I'm a decent programmer, but know very little about the hardware side. I've always wanted to build my own electronics though, and this seems like just the project to start with. I don't want to be annoying, but I feel like I'm at that exciting point where I feel so close to getting it working finally!

Ok, so devkit is nice to have for development, but I need a jlink mini (?) in order to program the custom pcb. That sure would have been nice if they made it so the devkit could do both!

Does this mean I'm going to run into the issue of needing to connect vref? I saw that you had mentioned needing to connect vref or the like at R6. Is that still necessary, and by doing that am I supposed to connect a wire to the resistor at R6, or ? Sorry if that's a dumb question. I see you've added pads to your new pcb to make it easier.

dannygrob commented 4 years ago

Hi,

Yes that's the right programmer you linked there. I used that one to program the pcb. The VREF needs to connect to vbat indeed (at least from what I found) to make the smartsnippets software detect it. The pad I added should help yes!

Which pcb did you order, the original SmarchWatch or my modified version? I did mod the PCB but I havn't ordered it myself yet. I wanted to go over it 1 more time to see if I did not mess something up.

No problem about all these questions. Feel free to e-mail me too if you feel your question is not helping other people, we can communicate more quickly -dannygrob at gmail