Avali Nexus Forum 1: A Cold Phoenix - Printable Version +- Avali Nexus (http://avalinexus.seraphimlabs.com/forum) +-- Forum: Nexus General (http://avalinexus.seraphimlabs.com/forum/forumdisplay.php?fid=1) +--- Forum: Avali Nexus General (http://avalinexus.seraphimlabs.com/forum/forumdisplay.php?fid=2) +---- Forum: The Archives (http://avalinexus.seraphimlabs.com/forum/forumdisplay.php?fid=11) +---- Thread: Avali Nexus Forum 1: A Cold Phoenix (/showthread.php?tid=1) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
|
RE: Avali Nexus Forum 1: A Cold Phoenix - Surge - 06-25-2015 http://www.reddit.com/r/WritingPrompts/comments/3awndk/wp_an_unnamed_henchmen_has_the_audacity_to_murder/ heeeeeheheh RE: Avali Nexus Forum 1: A Cold Phoenix - Jim_Clonk - 06-25-2015 (06-25-2015, 05:37 AM)Reks Wrote:(06-25-2015, 05:05 AM)Marxon Wrote: DIBS ON VAMPIRE KNIVES! Looks nice. You can be our architect then? Just please not taskbar next time xd RE: Avali Nexus Forum 1: A Cold Phoenix - SCN-3_NULL - 06-25-2015 and I really dont want my code looking from this Code: CLRF PORTB to something this magnitude of mess Code: CLRF PORTB RE: Avali Nexus Forum 1: A Cold Phoenix - Battle Bee - 06-25-2015 (06-25-2015, 06:05 AM)Jim_Clonk Wrote:(06-25-2015, 05:37 AM)Reks Wrote: Dunno why you're calling dibs. Everyone should be able to build. Not just one person. RE: Avali Nexus Forum 1: A Cold Phoenix - SCN-3_NULL - 06-25-2015 (06-25-2015, 06:06 AM)Battle Bee Wrote:(06-25-2015, 06:05 AM)Jim_Clonk Wrote: Looks nice. You can be our architect then? Just please not taskbar next time xd but everything I've build looks like a simpleton's apartment RE: Avali Nexus Forum 1: A Cold Phoenix - Segolia - 06-25-2015 (06-25-2015, 05:56 AM)SCN-3_NULL Wrote:(06-25-2015, 05:51 AM)Segolia Wrote: It's just a convenience function. You gotta do it yourself in assembly which means busy-waiting (throw the processor into a fixed length loop). To work out the time you need to bust out the data sheet and find out the clock speed, work out the number of cycles your loop takes and do some magic (my minds a bit hazy on the specifics atm).no...it's a PIC16F877a on a SK40C board with a 4MHz clock, I'm trying to have 5 LED light up in one direction and when a switch is pressed the LED lights up in the opposite direction, Using a clock of some kind is probably preferable to busy-waiting. Is there a configurable clock (like, with a register?). I'd do it something like this: -Configure clock to desired delay (eg. 500ms) -Store LED bitmask in some byte in memory or use a register (like "2_00000" where each digit corresponds to an LED in the sequence) -Initialise the bitmask with some value (eg. "2_00001") -On clock interrupt, circular shift right, use bitmask to determine which LED to light up and send a signal to the corresponding pin (alternatively you could save some hassle, say if your device has ports with multiple pins which share a single data register, just store the LED bitmask in the data register and shift that, then just hook LEDs up to appropriate pins) -Write an interrupt handler for the button press, simply make it toggle the direction of the shift which happens on the clock interrupt. RE: Avali Nexus Forum 1: A Cold Phoenix - Jim_Clonk - 06-25-2015 (06-25-2015, 06:06 AM)Battle Bee Wrote:(06-25-2015, 06:05 AM)Jim_Clonk Wrote: Looks nice. You can be our architect then? Just please not taskbar next time xd I'm pretty sure everyone will be able to build. but if someone how doesn't know what they are doing tries to build something onto the really fancy building someone made, that's probably not going to look very good. So what I meant was: the people who can make things look good, should be the ones to do so. RE: Avali Nexus Forum 1: A Cold Phoenix - Reks - 06-25-2015 (06-25-2015, 06:06 AM)Battle Bee Wrote:(06-25-2015, 06:05 AM)Jim_Clonk Wrote: Looks nice. You can be our architect then? Just please not taskbar next time xd (06-25-2015, 06:14 AM)Jim_Clonk Wrote:(06-25-2015, 06:06 AM)Battle Bee Wrote: Everyone should be able to build. Ahh, I don't wanna be the ONLY builder. It's just my primary focus. RE: Avali Nexus Forum 1: A Cold Phoenix - SCN-3_NULL - 06-25-2015 (06-25-2015, 06:08 AM)Segolia Wrote:I'm not sure about the configurable clock but I do finf TMR1,TMR2 and a few TRM in the special registers, are those what I'm looking for?(06-25-2015, 05:56 AM)SCN-3_NULL Wrote: no...it's a PIC16F877a on a SK40C board with a 4MHz clock, I'm trying to have 5 LED light up in one direction and when a switch is pressed the LED lights up in the opposite direction, and yes the device has ports, I'm planning on assembling them like this, but with 5LEDs and 4MHz clock And a code example would be really useful, dont see these in my slides, will put those in the comments just for reminder. and this is the SK40C board all I have to do is to pin in the leds on the ports on the sides where the chip is installed RE: Avali Nexus Forum 1: A Cold Phoenix - Jim_Clonk - 06-25-2015 (06-25-2015, 06:18 AM)Reks Wrote:I might take architect as a secondary focus. I can build kind of nice looking things.(06-25-2015, 06:06 AM)Battle Bee Wrote: Everyone should be able to build. RE: Avali Nexus Forum 1: A Cold Phoenix - Segolia - 06-25-2015 (06-25-2015, 06:24 AM)SCN-3_NULL Wrote:(06-25-2015, 06:08 AM)Segolia Wrote: Using a clock of some kind is probably preferable to busy-waiting. Is there a configurable clock (like, with a register?). I'd do it something like this:I'm not sure about the configurable clock but I do finf TMR1,TMR2 and a few TRM in the special registers, are those what I'm looking for? I can't give you a code example easily. I'd have to read through the datasheet for your device to even work out pinouts and registers properly. Not to mention I'm a bit rusty and I've never worked with PIC (I learned assembly with an ARM architecture). It should be pretty straightforward, you know how to write interrupt handlers right? psuedocode would look something like Quote:Main: And remember if you're using registers to store those values to push them onto the stack before running your interrupt handler. RE: Avali Nexus Forum 1: A Cold Phoenix - SCN-3_NULL - 06-25-2015 Currently in me head RE: Avali Nexus Forum 1: A Cold Phoenix - Reks - 06-25-2015 Okay, my eyes hurt a bit now so probably the last screenshot for the night, but RE: Avali Nexus Forum 1: A Cold Phoenix - Surge - 06-25-2015 "nah surge you should totally check out From the Depths, it so much smoother and better than those other sandbox builders" "I dunno" "totally man" "ehhh lemme look it up on youtube" verdict: I HAVE BEEN LIEEEEEED TOOOOO. RE: Avali Nexus Forum 1: A Cold Phoenix - roguephoenix64 - 06-25-2015 *shimmers into existence* I heard something about Terraria? RE: Avali Nexus Forum 1: A Cold Phoenix - Battle Bee - 06-25-2015 (06-25-2015, 07:04 AM)Reks Wrote: Okay, my eyes hurt a bit now so probably the last screenshot for the night, but You should use more sloped blocks. And place some stone and ore within the dirt, to make it seem a bit more natural. RE: Avali Nexus Forum 1: A Cold Phoenix - SilverOtter - 06-25-2015 So at first I was reading Explain xkcd, and next thing I knew I had just stopped browsing Wikipedia and installed a Usenet client on my computer and was googling for a server that carried the newsgroups I was looking for. I don't even. RE: Avali Nexus Forum 1: A Cold Phoenix - Reks - 06-25-2015 (06-25-2015, 07:08 AM)Battle Bee Wrote:(06-25-2015, 07:04 AM)Reks Wrote: Okay, my eyes hurt a bit now so probably the last screenshot for the night, but Those finishing touches come soon But not quiiiite yet. Which is why, aside from placing enough in some of the homes to get NPCs in there, they're entirely unfurnished. I'm mostly walking into it a bit at a time, and I'm close to being finished with the framework. Then comes the small things that make it look extra nice, such as slopes, halfblocks, and more than just dirt RE: Avali Nexus Forum 1: A Cold Phoenix - Surge - 06-25-2015 >made a comment on /r/writingprompts, got downvoted. Yeah well fuck you guys too! I'll go start my own writing based subreddit! RE: Avali Nexus Forum 1: A Cold Phoenix - SCN-3_NULL - 06-25-2015 okay, Ithink I got a working code Code: LIST p=16F877a, so far I think it'll go one way as intended but I'm unsure will it go the other wat when a switch is pressed. and for the last time is anyone going to fix the code box! |